Abstract Magnesium alloys have gained attention as biodegradable bone repair biomaterials. Unlike non-biodegradable materials like titanium and tantalum, biodegradable implants offer advantages in promoting bone healing and minimizing chronic inflammatory reactions. However, the impact of the implant's degradation on the osteogenic environment remains a concern. The Mg-Zn-Ca-MgO composite, being biocompatible and containing osteogenic ions, is a promising candidate. This study assesses the degradability and in vitro/in vivo biocompatibility of two Mg-Zn-Ca-MgO composites with varying degradation rates. The Mg-1Zn-0.2Ca-1.0MgO composite was prepared, and leaching solutions were created following standard protocols. MC3T3-E1 cell cultures were conducted to assess cell toxicity, alkaline phosphatase (ALP) staining, cytoskeleton morphology, and osteogenic protein expression. In vivo biodegradation and bone regeneration capacity were evaluated in rat femoral condyles. Benefiting from the more protective corrosion product layer on the surface, the ultra-fine grained (UFG) composite showed better corrosion resistance and lower Mg2+ release than the coarse-grained (CG) composite. UFG material exhibited higher cell viability, cytoskeleton integrity, ALP secretion, and osteogenic protein expression. In vivo, UFG composites led to greater bone regeneration and exhibited excellent biocompatibility. The UFG Mg-Zn-Ca-MgO composite demonstrates enhanced biocompatibility, corrosion resistance, and bone regeneration potential. This study highlights the importance of controlling Mg ion release for optimal bone healing in biodegradable materials.