Due to their biocompatibility, biodegradability, injectability, and self-setting properties, calcium–magnesium phosphate cements (MCPCs) have proven to be effective biomaterials for bone defect filling. Two types of MCPC powders based on the magnesium whitlockite or stanfieldite phases with MgO with different magnesium contents (20 and 60%) were synthesised. The effects of magnesium ions (Mg2+) on functional properties such as setting time, temperature, mechanical strength, injectability, cohesion, and in vitro degradation kinetics, as well as cytocompatibility in the MG-63 cell line and the osteogenic differentiation of BM hMSCs in vitro, were analysed. The introduction of NaHA into the cement liquid results in an increase in injectability of up to 83%, provides a compressive strength of up to 22 MPa, and shows a reasonable setting time of about 20 min without an exothermic reaction. These cements had the ability to support MG-63 cell adhesion, proliferation, and spread and the osteogenic differentiation of BM hMSCs in vitro, stimulating ALPL, SP7, and RUNX2 gene expression and ALPL production. The combination of the studied physicochemical and biological properties of the developed cement compositions characterises them as bioactive, cytocompatible, and promising biomaterials for bone defect reconstruction. © 2025 Elsevier B.V., All rights reserved.