Magnesium and its alloys have been suggested as potential absorbable implant materials due to their excellent biodegradability and biocompatibility. Current researchers focus on reducing the rapid corrosion rate of Mg and its alloys by alloying and surface modification. To improve the corrosion resistance, pure Mg is modified by micro-arc oxidation (MAO) in phosphate electrolyte containing sodium hydroxide and its properties are compared with those formed using only phosphate or sodium hydroxide as electrolytes. A uniform and stable coating layer is formed on Mg after MAO treatment in phosphate electrolyte containing sodium hydroxide. The corrosion resistance of MAO-coated Mg is evaluated by potentiodynamic polarization study and immersion test. The results reveal that MAO coating enables a good improvement in corrosion resistance, and among them, coatings treated using phosphate electrolyte containing sodium hydroxide offer the best performance. Copyright © 2013 John Wiley & Sons, Ltd.