Biphasic calcium phosphate (BCP) is a highly study bone defect repair material with adjustable degradation, perfect osteoconduction and good osteoinduction. As one of the essential trace elements, magnesium (Mg) possesses the abilities of pro-osteogenesis and pro-angiogenesis. Therefore, Mg doping may further expand the application of BCP in bone defect repair, but few studies focus on promoting the osteogenesis and angiogenesis of BCP simultaneously by Mg doping, and the optimal doping amount of Mg remains to be explored. In this study, the physicochemical and biological properties of BCP scaffold affected by Mg doping were systematically study. Results showed that Mg doping enhanced the sintering of BCP scaffold, resulting in the decrease of degradation rate at the initial soaking period. However, the introduction of Mg damaged the lattice stability of BCP, leading to the increase of BCP degradation rate at the later soaking period. BCP scaffolds with Mg doping content ≥3 mol.% could achieve a long-term sustained release of Mg. The ion microenvironment created by Mg-doped scaffolds was simultaneously conducive to the osteogenic differentiation of stem cells and the enhanced angiogenic activity of endothelial cells. The scaffold doped with 5 mol.% of Mg (Mg5–S) showed the highest efficiency in promoting osteogenic differentiation. Mg-doped BCP scaffolds with a doping content ≥3 mol.%, especially Mg5–S, significantly improved the proliferation and angiogenic differentiation of endothelial cells. Based on these, we believe that the optimal doping content of Mg in BCP is 5 mol.%, and Mg5–S has great application potential in bone defect repair.