The wear and corrosion protective coatings were synthesized on AZ91 Mg alloy and Mg matrix SiCw/AZ91 composite by a microarc oxidation (MAO) technique in an alkali-silicate electrolyte solution. The phase structure of the coatings was analyzed using X-ray diffraction (XRD). The tribological properties of the coatings sliding against GCr15 steel were investigated on a pin-on-disc friction and wear tester. The morphology and elemental composition of the worn coating surface were determined by scanning electron microscopy (SEM) and energy dispersive spectrometer (EDS). The potentiodynamic polarizing curves were measured to evaluate the corrosion resistance of the coatings. The results showed that the application of the coatings changed evolution tendency of friction coefficients and wear mechanism. For coated Mg alloy and Mg matrix composite, both the wear resistance and corrosion resistance were improved greatly.