Calcium phosphate coated Mg alloy was prepared. The phase constitute and surface morphology were identified and observed by X-ray diffractometer (XRD) and SEM. The results show that the coating is composed of flake-like CaHPO4-2H2O crystals. The corrosion resistance of the coated Mg alloy was measured by electrochemical polarization and immersion test in comparison with uncoated Mg alloy. Cytocompatibility was designed by observing the attachment, growth and proliferation of L929 cell on both coated and uncoated Mg alloy samples. The results display that the corrosion resistance of the coated Mg alloy is better than that of uncoated one. The immersion test also shows that the calcium phosphate coating can mitigate the corrosion of Mg alloy substrate, and tends to transform into hydroxyapatite (HA). Compared with uncoated Mg alloy, L929 cells exhibit good adherence, growth and proliferation characteristics on the coated Mg alloy, indicating that the cytocompatibility is significantly improved with the calcium phosphate coating.