This review presents an overview of the recent developments in the synthesis of layered double hydroxide (LDH) on the anodized films of Mg alloys prepared by either conventional anodizing or plasma electrolytic oxidation (PEO) and the applications of the formed composite ceramics as smart chloride traps in corrosive environments. In this work, the main fabrication approaches including co-precipitation, in situ hydrothermal, and an anion exchange reaction are outlined. The unique structure of LDH nanocontainers enables them to intercalate several corrosion inhibitors and release them when required under the action of corrosion-relevant triggers. The influences of different variables, such as type of cations, the concentration of salts, pH, and temperature, immersion time during the formation of LDH/anodic film composites, on the electrochemical response are also highlighted. The correlation between the dissolution rate of PEO coating and the growth rate of the LDH film was discussed. The challenges and future development strategies of LDH/anodic films are also highlighted in terms of industrial applications of these materials.