Lithium-ion batteries (LIBs) have greatly facilitated our daily lives since 1990s [1,2]. To meet the ever-increasing demand on energy density, Li metal is seen as the ultimate anode because of its ultra-high specific capacity (3860 mAh/g) and the lowest electrochemical potential (- 3.04 V vs. the standard hydrogen elec-trode) [3–6]. However, issues of Li metal anode, such as Li dendrite formation and large volume change during plating/stripping, in-evitably result in low coulombic efficiency and poor cycling perfor-mance [7,8]. To solve these issues, many approaches, such as elec-trolyte optimization [9], fabricating artificial solid electrolyte inter-face (SEI) [10–12] and utilizing porous current collectors [13,14], alloying Li [15] have been proposed. Nevertheless, the flammabil-ity of the liquid organic electrolytes in LIBs would lead to safety challenges, which could not be solved by these approaches [9].