Energy-harvesting devices attract wide interest as power supplies of today's medical implants. Their long lifetime will spare patients from repeated surgical interventions. They also offer the opportunity to further miniaturize existing implants such as pacemakers, defibrillators or recorders of bio signals. A mass imbalance oscillation generator, which consists of a clockwork from a commercially available automatic wrist watch, was used as energy harvesting device to convert the kinetic energy from the cardiac wall motion to electrical energy. An MRI-based motion analysis of the left ventricle revealed basal regions to be energetically most favorable for the rotating unbalance of our harvester. A mathematical model was developed as a tool for optimizing the device's configuration. The model was validated by an in vitro experiment where an arm robot accelerated the harvesting device by reproducing the cardiac motion. Furthermore, in an in vivo experiment, the device was affixed onto a sheep heart for 1 h. The generated power in both experiments-in vitro (30 μW) and in vivo (16.7 μW)-is sufficient to power modern pacemakers.