Ceramic coatings were prepared on ZK60 magnesium alloy in electrolyte with different concentration ratio of calcium and phosphorus (Ca/P) by micro‐arc oxidation (MAO) technique at constant voltage. The microstructure, phase composition, elemental distribution, corrosion resistance, and adhesion of the coatings were investigated by scanning electron microscope (SEM), X‐ray diffractometer (XRD), energy‐dispersive X‐ray spectrometry (EDS), electrochemical workstation, and scratch spectrometer, respectively. The coating biocompatibility was evaluated by in vitro cytotoxicity tests and systemic toxicity tests, and the bioactivity and degradability were evaluated by simulation body fluid (SBF) immersion tests. SEM shows that pores with different shapes distribute all over the coating surface. The adhesion and thickness of the coatings increases with increasing Ca/P ratio of electrolyte. The in vitro cytotoxicity tests and systemic toxicity texts demonstrate that the coatings have no toxicity to cell and living animal, which show that the coatings have excellent biocompatibility. XRD analysis shows that bioactive calciumphosphate (CaP) phases such as hydroxyapatite (HA, Ca10(PO4)6(OH)2) and calcium pyrophosphate (CPP, Ca2P2O7) are induced in the immersed coatings, indicating that the MAO coatings have excellent bioactivity. © 2012 Wiley Periodicals, Inc. J Biomed Mater Res Part B: Appl Biomater, 2012.