Diabetes mellitus is associated with bone loss. Patients with type 2 diabetes are frequently treated with oral antidiabetic drugs such as sulfonylureas, biguanides, and thiazolidinediones. Rosiglitazone treatment has been shown to increase adipogenesis in bone marrow and to induce bone loss. In this study we evaluated the effect of in vivo and in vitro treatment with metformin on bone marrow progenitor cells (BMPCs), as well as the involvement of AMPK pathway in its effects. The in vitro effect of coincubation with metformin and rosiglitazone on the adipogenic differentiation of BMPCs also was studied. In addition, we evaluated the effect of in vivo metformin treatment on bone regeneration in a model of parietal lesions in nondiabetic and streptozotocin-induced diabetic rats. We found that metformin administration both in vivo and in vitro caused an increase in alkaline phosphatase activity, type I collagen synthesis, osteocalcin expression, and extracellular calcium deposition of BMPCs. Moreover, metformin significantly activated AMPK in undifferentiated BMPCs. In vivo, metformin administration enhanced the expression of osteoblast-specific transcription factor Runx2/Cbfa1 and activation of AMPK in a time-dependent manner. Metformin treatment also stimulated bone lesion regeneration in control and diabetic rats. In vitro, metformin partially inhibited the adipogenic actions of rosiglitazone on BMPCs. In conclusion, our results indicate that metformin causes an osteogenic effect both in vivo and in vitro, possibly mediated by Runx2/Cbfa1 and AMPK activation, suggesting a possible action of metformin in a shift toward the osteoblastic differentiation of BMPCs.