Provided are a heart rate detection method and a wearable device. The wearable device includes a casing, a processor installed in the casing, and an optical heart rate sensing module and a distance sensing module connected to the processor and installed on a side of the casing facing a wearing part of a user. The method includes: detecting, by the distance sensing module, a positional relationship between the optical heart rate sensing module and the wearing part of the user to obtain relative position data of the optical heart rate sensing module relative to the wearing part of the user; and adjusting a signal transmission power of the optical heart rate sensing module according to the relative position data, and detecting, by the optical heart rate sensing module, a heart rate of the user.