Developing novel, environmentally friendly, and efficient corrosion inhibitors is of great significance for improving the durability of marine concrete against chloride ion erosion. This paper aims to explore the potential of layered double hydroxides (LDHs) as nanocontainers, incorporating organic corrosion inhibitors between LDHs layers to synergistically enhance their effectiveness. In this study, Mg/Al-pAB-LDH was synthesized through the interlayer modification of LDHs with an organic corrosion inhibitor, p-aminobenzoic acid (pAB), employing a calcination-rehydration method. Chloride ion (Cl−) adsorption behavior was quantitatively and qualitatively analyzed and the effect on mortar properties was investigated. The corrosion resistance of steel bars in the mortar was assessed under chloride salt simulated concrete pore solution (SCPs) and chloride salt wet-dry cycles via electrochemical tests and microscopic characterization of Mg/Al-pAB-LDH. The results demonstrate that Mg/Al-pAB-LDH efficiently captures Cl− and releases corrosion-inhibiting ions pAB, with the adsorption process conforming to pseudo-second-order kinetics and Langmuir adsorption isotherm. Mg/Al-pAB-LDH enhances the pore structure of mortar, effectively improving mechanical properties and resistance to chloride ion penetration, with the optimal effect observed at a 4 % addition rate. Mg/Al-pAB-LDH demonstrates outstanding corrosion resistance to steel bars in both SCPs and mortar. In SCPs, it serves as a corrosion inhibitor by adsorbing Cl− and releasing pAB, whereas in mortar, it functions as a corrosion inhibitor by enhancing the physical barrier effect of mortar, adsorbing Cl−, and releasing pAB. This study demonstrates the promising potential of utilizing Mg/Al-pAB-LDH as a novel corrosion inhibitor to mitigate the corrosion of steel bars in marine concrete.