This study presents a novel approach to improving the anticorrosive performance of AZ31 Mg alloy by exploiting the role of the hydration reaction to induce interactions between Quinolin-8-ol (8HQ) molecules and the porous MgO layer formed via plasma electrolytic oxidation (PEO). The AZ31 Mg alloy, initially coated with a PEO layer, underwent a dipping treatment in an ethanolic solution of 0.05 M 8HQ at 50 °C for 3 h.