Current cardiovascular implantable electronic devices (CIEDs) face a pressing clinical need for the development of battery-free, biodegradable, and biocompatible devices to mitigate the risk of adverse in vivo responses. To address this demand, it is proposed utilizing a natural biomaterial, silk sericin (SS), which exhibits valuable biological activities and contains abundant asymmetric amino acids with adjustable structures, to create an implantable self-powered system based on the piezoelectric principle. The functionalized SS-based (F-SS-based) piezoelectric film demonstrates a high longitudinal piezoelectric tensor (d33) of 12 pC N-1. An energy-generating device (EG device) utilizing this piezoelectric film can generate electric energy under mechanical force both in vitro and in vivo. By manually tapping the EG-device for a few minutes, the accumulated electricity in a commercial capacitor (1.1 µF) could illuminate LEDs or operate a timer. Furthermore, the instantaneous energy power density (218.5 µW m-2) achieved by manual pressing the EG device is sufficient to deliver effective pacing to restart a non-beating heart or normalize an atrioventricular block in a preclinical model. Owing to its high biocompatibility and biodegradability in physiological environments, the F-SS-based EG device holds significant promise for the advancement of self-powered power systems for next-generation CIEDs and other implantable and degradable electronic devices.