In summary, we demonstrated that Mg2+ promoted Nrf2 nucleation through SESN2 upregulation, thereby reducing the level of mitochondrial oxidative stress in endothelial cells under hyperglycemia in vitro and promoting peri-implant vascularization and osseointegration in diabetic mice. The gene discussed is SESN2; the disease is Hyperglycemia.