Self-powered implantable devices have the potential to extend device operation time inside the body and reduce the necessity for high-risk repeated surgery. Without the technological innovation of in vivo energy harvesters driven by biomechanical energy, energy harvesters are insufficient and inconvenient to power titanium-packaged implantable medical devices. Here, we report on a commercial coin battery-sized high-performance inertia-driven triboelectric nanogenerator (I-TENG) based on body motion and gravity. We demonstrate that the enclosed five-stacked I-TENG converts mechanical energy into electricity at 4.9 μW/cm3 (root-mean-square output). In a preclinical test, we show that the device successfully harvests energy using real-time output voltage data monitored via Bluetooth and demonstrate the ability to charge a lithium-ion battery. Furthermore, we successfully integrate a cardiac pacemaker with the I-TENG, and confirm the ventricle pacing and sensing operation mode of the self-rechargeable cardiac pacemaker system. This proof-of-concept device may lead to the development of new self-rechargeable implantable medical devices. Self-powered implantable devices have the potential to extend device operation, though current energy harvesters are both insufficient and inconvenient. Here the authors report on a commercial coin battery-sized high-performance inertia-driven triboelectric nanogenerator based on body motion and gravity that can be used to charge a lithium-ion battery and integrated into a cardiac pacemaker.