In order to increase the hardness and wearproof of magnesium alloy parts it is necessary to use protective coatings. These surface layers were formed by plasma electrolytic oxidation (PEO) in the electrolyte containing nanosized particles of titanium nitride. Xray photoelectron spectroscopy and Raman spectroscopy showed the presence of TiN, TiOxNy, and TiO2 compounds in the composition of the PEOlayer. Oxidation of TiN in TiOxNy and TiO2 was realized during the PEO treatment. It has been shown that the best protective mechanical properties are attributed to the coatings formed in electrolytes with TiN concentrations of 23 gl. Mechanical properties of the obtained layers have been studied. It has been established that the hardness of nanoparticlescontaining coatings is twofold higher in comparison with the PEOcoating formed in the base electrolyte its wear resistance increases in 2.2 times. Thus, the incorporation of TiN nanoparticles into the composition of the PEOcoating improves significantly mechanical properties of the surface of magnesium alloys. This, in turn, makes it possible to expand the field of application of these materials in such industries as aviation, automotive, development of hightech products and devices.