Mg-air batteries are explored as the next-generation power systems for wearable and implantable electronics as they could work stably in neutral electrolytes and are also biocompatible. However, high corrosion rate and low utilization of Mg anode largely impair the performance of Mg-air battery with low discharge voltage, poor specific capacity and low energy density. Here, to the best of our knowledge, we first report a dual-layer gel electrolyte to simultaneously solve the above two problems by preventing the corrosion of Mg anode and the production of dense passive layer, respectively. The resulting Mg-air batteries produced an average specific capacity of 2190 mAh g À1 based on the total Mg anode (99.3 % utilization rate of Mg anode) and energy density of 2282 Wh kg À1 based on the total anode and air electrode, both of which are the highest among the reported Mg-air batteries. Besides, our Mg-air batteries could be made into a fiber shape, and they were flexible to work stably under various deformations such as bending and twisting.Wearable and implantable electronic devices represent the next-generation electronics and are booming rapidly in the recent decade. [1][2][3] To stably and long-termly power these electronic devices, it is critical to make matchable and safe energy storage devices. [4][5][6][7] To this end, metal-air batteries with high energy densities have attracted increasing interests. [8,9] Among them, Mg-air batteries work stably in neutral electrolytes and are also biocompatible as Mg 2+ ions are harmless to the human body. [10][11][12] Therefore, Mg-air batteries are explored as promising candidates on the skin and inside the body.