Ceramic coatings were synthesized on pure magnesium, binary Mg-Al and Mg-Zn alloys by plasma electrolytic oxidation (PEO) technique, and their mechanical and electrochemical properties were investigated. The coatings showed porous microstructure and some volcano top-like pores on the surface. The coatings on Mg-Al alloys consisted of MgO, MgAl2O4 and Al2O3. In the coatings on Mg-Zn alloys, MgO and ZnO were detected. The hardness and wear resistance showed slight dependence on Al content but no tendency to increase with increasing Zn content. The coated Mg alloys with Al, Zn showed better corrosion resistance in 3.5%NaCl solution but poor corrosion resistance in methyl alcohol, compared to the coated pure Mg.