In this paper, the magnesium alloy AZ91D as biological implant material was treated by micro-arc oxidation. The effects on the coating growth of oxidation time and terminal voltages in zirconium solution and silicate solution were investigated respectively. Immersion and electrochemical tests were applied to study the corrosion behavior of AZ91D alloy in Hank’s solution. The results revealed that the coating thickness increases and the corrosion rate in immersion test decreases as the extension of oxidation time and the rising of terminal voltage. The corrosion rate of the alloy in the immersion test treated in zirconium solution varies with the terminal voltages and that in silicate solution depends on the coating thickness. In the polarization curves test, the corrosion current of the MAO treated alloy is two orders of magnitude lower than that of original samples and the polarization curves in zirconium solution show bigger anode and cathode polarizability which indicates that the MAO coating has a strong blocking effect of the corrosion. The corrosion resistance of MAO treated magnesium AZ91D improves significantly.