We considered coatings obtained on a magnesium based substrate with a different content of a bioactive component, nanosized hydroxyapatite (HAp). The properties of coatings formed by plasma electrolytic oxidation (PEO) in electrolytes containing calcium compounds were compared. Coatings obtained in the electrolyte with HAp demonstrated higher strength characteristics compared to coatings obtained in the glycerophosphate electrolyte. It can be explained by the hardness of the components included in the coating (Mg2SiO4) as well as by the presence of hydroxyapatite nanoparticles. Oxidation of composite samples in an electrolyte with HAp leads to a decrease in the corrosion current density by 2 orders of magnitude compared to this parameter for uncoated samples.