The application of porous bioactive ceramics as bone substitutes requires their effective osseointegration, which relies on specific physical and biological properties. In this study, we developed porous magnesium-doped hydroxyapatite (MgHA) ceramics with four different magnesium concentrations (0.25, 2, 5 and 10 mol%). The ceramics were prepared through the polymeric replication sponge method and subjected to physical and biological characterizations. Upon sintering, the porous 10 mol% MgHA ceramics exhibited increased densification, which resulted in the highest compressive strength of 2.17 MPa at the lowest porosity of 31 %.The porous samples were analysed via microcomputed tomography. The scaffolds with 0.25 and 10 mol% Mg doping concentrations were selected to elucidate the influence of Mg on morphometric parameters and biological properties at two distinct levels. The high level of Mg doping led to considerable improvements in relative bone volume, connectivity density, trabecular number and trabecular thickness. Cell attachment and proliferation tests using Vero cell lines were conducted on both samples to investigate the correlations between their morphometric parameters and bioactivities. Substantially more cells attached to and proliferated on the surface of the 10 mol% MgHA ceramics compared with those on the ceramics containing 0.25 mol% MgHA. In summary, our study underscores the effectiveness of Mg incorporation in improving the physical and biological properties of porous HA ceramics, which makes them promising candidates for bone substitute applications.