At present, the drug treatment of osteoporosis is mostly focused on inhibiting osteoclastogenesis, which has relatively poor effects. Metformin is a drug that can potentially promote osteogenic differentiation and improve bone mass in postmenopausal women. We aimed to detect the molecular mechanism underlying the osteogenic effect of metformin. Our study indicated that metformin obviously increased the Alkaline phosphatase activity and expression of osteogenic marker genes at the mRNA and protein levels. The PI3K/AKT signaling pathway was revealed to play an essential role in the metformin-induced osteogenic process, as shown by RNA sequencing. We added LY294002 to inhibit the PI3K/AKT pathway, and the results indicated that the osteogenic effect of metformin was also blocked. Additionally, the sequencing data also indicated oxidation-reduction reaction was involved in the osteogenic process of osteoblasts. We used H2O2 to mimic the oxidative damage of osteoblasts, but metformin could attenuate it. Antioxidative Nrf2/HO-1 pathway, regarded as the downstream of PI3K/AKT pathway, was modulated by metformin in the protective process. We also revealed that metformin could improve bone mass and oxidative level of OVX mice. In conclusion, our study revealed that metformin promoted osteogenic differentiation and H2O2-induced oxidative damage of osteoblasts via the PI3K/AKT/Nrf2/HO-1 pathway.