In this study, the effects of calcium (Ca) and yttrium (Y) on the microstructure, mechanical properties, corrosion behaviour and biocompatibility of magnesium (Mg) alloys, i.e. Mg–xCa (x = 0.5, 1.0, 2.0, 5.0, 10.0, 15.0 and 20.0%, wt%, hereafter) and Mg–1Ca–1Y, were investigated. Optical microscopy, X-ray diffractometry (XRD), compressive and Vickers hardness testing were used for the characterisation and evaluation of the microstructure and mechanical properties. The in vitro cytotoxicity of the alloys was assessed using osteoblast-like SaOS2 cells. The corrosion behaviour of these alloys was evaluated by soaking the alloys in simulated body fluid (SBF) and modified minimum essential medium (MMEM) at 37 °C in a humidified atmosphere with 5% CO2. Results indicated that the increase of the Ca content enhances the compressive strength, elastic modulus and hardness of the Mg–Ca alloys, but deteriorates the ductility, corrosion resistance and biocompatibility of the Mg–Ca alloys. The Y addition leads to an increase in the ductility; but a decrease in the compressive strength, hardness, corrosion resistance and biocompatibility of the Mg–1Ca–1Y alloy when compared to the Mg–1Ca alloy. Solutions of SBF and MMEM with the immersion of Mg–xCa and Mg–1Ca–1Y alloys show strong alkalisation. Our research results indicate that Mg–xCa alloys with Ca additions less than 1.0 wt% exhibited good biocompatibility, low corrosion rate as well as appropriate elastic modulus and strength; whilst the Y is not a proper element for Mg alloys for biomedical application due to its negative effects to the corrosion resistance and biocompatibility.