Magnesium (Mg) and its alloys are widely used in orthopedic implants due to their mechanical compatibility with bone tissue. However, their susceptibility to corrosion can compromise mechanical strength over time. The present study aims to enhance the corrosion resistance of AZ31 Mg alloy through Plasma Electrolytic Oxidation (PEO) coatings incorporating Hydroxyapatite (HAP). The effects of 5g of HAP in different electrolytic solutions—Sodium Silicate (Na2SiO39H2O) + Potassium Hydroxide (KOH) and Sodium Phosphate (Na₃PO₄) + Triethanolamine (C6H15NO3)—on the microstructure and corrosion characteristics were evaluated. The phase composition was analyzed using X-ray Diffraction (XRD) and Energy Dispersive Spectroscopy (EDS), while the surface morphology and cross-section of the coatings were assessed using Field Emission Scanning Electron Microscopy (FESEM). Corrosion studies were performed using Potentiodynamic Polarization (PDP) and Electrochemical Impedance Spectroscopy (EIS) under Simulated Body Fluid (SBF) conditions. The results showed that the sample with the solution containing 5 g of HAP + Na₃PO₄ + C₆H₁₅NO₃ (PS-2) exhibited superior anti-corrosion properties compared to the sample with 5 g of HAP + Na₂SiO₃·9H₂O + KOH (PS-1). Notably, the cross-sectional analysis revealed significantly smaller pores in the PS-2 coatings. Among the two coated samples, the highest polarization resistance of 3.06 × 10⁶ Ω·cm² was observed for PS-1, while PS-2 showed a lower resistance of 2.9 × 10⁶ Ω·cm², correlating with their morphological characteristics. These findings suggest that sodium phosphate and triethanolamine improve biocompatibility when combined with pure AZ31 Mg alloy and HAP coatings.