Mg and its alloys are suitable choices for implant materials due to their biodegradability and biocompatibility features. However, the high electrochemical activity of this family of biomaterials results in their fast degradation and severe corrosion in the physiological environment, producing hydrogen (H2) gas, and therefore increasing the pH of the environment. To meet the clinical requirements, the degradation rate of Mg biomaterials needs to be reduced.