Abstract Cardiac arrhythmias are common disorders that can be fatal. Modern methods of treating bradyarrhythmias include the implantation of pacemakers and cardioverters – defibrillators. However, the implantable devices can cause various complications including infectious ones, related to the electrodes installed inside the heart. Less invasive heart rhythm modulation could be beneficial for some cohorts of patients. We present an alternative approach to heart pacing based on thermogenetics. We used adeno-associated viruses to deliver genetic human transient receptor potential subfamily V member 1 (TRPV1), a heat-sensitive cation channel, into isolated cardiomyocytes and the mouse heart. This allowed us to induce action potentials and control contractility using short heat pulses delivered by infrared laser illumination. Using this approach, we demonstrated the thermogenetic pacing of isolated cardiomyocytes in vitro and in the mouse heart in vivo . Our results demonstrate the unique potential of thermogenetics for developing novel therapeutic strategies for heart rhythm modulation.