AbstractIn-situ incorporation of layered double hydroxides (LDH) nanocontainers into plasma electrolytic oxidation (PEO) coatings on AZ91 Mg alloy has been achieved in the present study. Fumarate was selected as Mg corrosion inhibitor for exchange and intercalation into the nanocontainers, which were subsequently incorporated into the coating. It was found that the thickness and compactness of the coatings were increased in the presence of LDH nanocontainers. The corrosion protection performance of the blank PEO, LDH containing PEO and inhibitor loaded coatings was evaluated by means of polarization test and electrochemical impedance spectroscopy (EIS). The degradation process and corrosion resistance of PEO coating were found to be greatly affected by the loaded inhibitor and nanocontainers by means of ion-exchange when corrosion occurs, leading to enhanced and stable corrosion resistance of the substrate.