The kinetics of plasma-electrolytic oxidation (PEO) coating growth on AZ31 alloy in an alkaline-phosphate-aluminate electrolyte was studied. The structure, elemental composition and corrosion resistance of obtained PEO coatings were studied as a function of thickness. It was established that formation of the coating layers takes place in the following sequence: anodic, external and internal layers. Their formation occurs due to: 1) dielectric layer formation due to anodic conversion of surface; 2) ignition of powerful microdischarges in the transversal pores of the initially formed coating, forming the main part of its outer layer in case of increasing duration of the PEO process; 3) etching of magnesium alloy as a result of electrolyte penetration through the transversal pores to the metal substrate, followed by its anodizing; 4) ignition of microdischarges under the coatings outer layer, leading to formation of an inner layer. Existence of the coating inner layer causes a significant increase in corrosion resistance; however, it is still insufficient for long-lasting standalone corrosion protection. It was shown that sodium oleate (SOl) is the best inhibitor for the AZ31 substrate, therefore it was selected for impregnating PEO coatings. Impregnation of the coatings in 10 mM SOl solution increases their protective ability. Corrosion tests of PEO coated AZ31 samples in a climate chamber showed that the effect of impregnating is most pronounced for thin PEO coatings (20 μm). Under more corrosive conditions of salt spray test, impregnating the PEO coating with SOl increased the time until the appearance of the first corrosion marks. It also significantly slowed down the development of the corrosion marks compared with the samples coated by PEO without impregnation.