Transient implantable medical bionics offer great promise in the field of smart controlled release and tissue regeneration. On-board energy storage is the ideal power system to drive them. In this work, a critical component of such a device, a biodegradable polymer electrolyte (silk fibroin–choline nitrate) has been developed. The efficiency of this electrolyte is demonstrated when deployed in a biodegradable thin-film magnesium battery. The battery, encapsulated in silk, offers a specific capacity of 0.06 mAh cm–2. The enzymatic degradation of the whole device occurs over 45 days in the buffered protease XIV solution. A programmed battery lifetime can be achieved using silk protection layers. This battery system provides a new avenue for an on-board biodegradable power source for next-generation transient medical bionics.