In this study, to examine the regulatory relationship between metformin and the AMPK-PPARγ-ERS axis in osteoporosis prevention, we treated mouse osteoblasts and a diabetic rat model with metformin and then explored the mechanism by which metformin affects hyperglycaemia-induced osteoporosis. The gene discussed is PPARG; the disease is osteoporosis.