Thus, we identify and functionally validate that metformin prevents hyperglycaemia-induced osteoporosis by regulating the AMPK-PPARγ-ERS axis. The gene discussed is PPARG; the disease is Hyperglycemia.