Corrosion resistance of AZ91D magnesium alloy is weak in air. In order to reveal corrosion mechanism and improve performance, the morphology, nficrostructure and phase composition of microarc oxidation (MAO) film on AZ91D magnesium alloy were studied by scanning electron microscopy (SEM) and X-ray diffraction (XRD). Furthermore the corrosion resistance of film was tested. Results show that the MAd film on AZ91D magnesium alloy contains three layers that are outer layer, middle layer and inner layer. Some small discharge pores lie in the outer layer. The middle layer is loose and thick. Inner layer is combined to metal substrate tightly. The MAd film is mainly composed of MgO, MgSiO_3, MgAI_2O_4 and Mg_3 (PO_4)_2 compounds. The microarc oxidation is proved to improve corrosion resistance of AZ91D after three -week immersion in 3% NaCI solutinn. There exist pitting corrosion on the oxide film for ninny small particles containing Si and P element richly on the surface are electrochenfically active sites easy to corrode.