In this work, corrosion of the AZ31 magnesium alloy was examined in 0.05 M NaCl solutions containing 0.01–0.150 mol/dm3 of potassium permanganate as a corrosion inhibitor. A set of electrochemical impedance spectroscopy, linear sweep voltammetry, and hydrogen evolution measurements revealed high inhibitor effectiveness at relatively high (0.150 mol/dm3) KMnO4 concentrations. Based on data of energy-dispersive X-ray analysis, scanning electron microscopy, and Raman spectroscopy, a mechanism of the corrosion inhibition of AZ31 alloy by potassium permanganate in chloride-containing media was proposed.