Ensuring the durability of underground structures and geotechnical infrastructure against chloride-induced corrosion is a pivotal engineering challenge. While polymer microcapsules are widely utilized for self-healing concrete, the mechanism by which the capsule wall material influences the permeability and ion adsorption within the cement matrix remains insufficiently understood. In this study, a C–S–H/urea–formaldehyde (UF)/NaCl molecular dynamics model was established to investigate the barrier performance of UF microcapsule walls against sodium chloride ingress on the C–S–H surface. The simulation results reveal that the introduction of UF strengthens Ca–O correlations in C–S–H, leading to a denser gel structure. Although Na and Cl ions are adsorbed indirectly through an Os–Na–Ow–Cl configuration, the presence of UF significantly alters this dynamic. Specifically, UF forms strong hydrogen bonds with water molecules, restricting their mobility and effectively reducing the coordination numbers of Na and Cl, thereby acting as a barrier to ionic transport. Furthermore, the study elucidates environmental impacts, showing that ion mobility accelerates with increased pore size. Regarding temperature effects, the simulation indicates that even within ambient service ranges, rising temperatures increase kinetic energy and weaken the interactions between surface hydroxyls and water molecules, promoting chloride diffusion. These findings provide valuable insights into how polymer microcapsules modify ion adsorption mechanisms to enhance the impermeability and prolong the service life of self-healing concrete in saline geotechnical environments.