During the completion of a natural gas well, the annular gas migration of the cement paste significantly damages the cement quality. Thus, the cement with self-repairing property has great significance in oil well applications. In this work, chemically cross-linked hydrogels were synthesized by the solution polymerization of acrylamide, acrylic acid, and 2-(dimethylamino)ethyl methacrylate (DMAEMA) with NMBA as cross linker to plug the CO 2 -triggered microcracks in the cement paste. The mechanical strength of the hydrogel (Cu-PMAD) was significantly enhanced by complexation between Cu 2+ and the carboxyl group of the hydrogel network. As a self-healing plugging material, Cu-PMAD hydrogel powder was mixed with cement to prepare self-repairing cement slurry. The amphoteric structure of hydrogel was triggered by CO 2 due to the DMAEMA unit of the hydrogel was protonated, and the hydrogel can swell further by the anti-polyelectrolyte effect under CO 2 of nature gas and formation salt-bearing fluid. The good swelling ability and mechanical properties endowed the Cu-PMAD hydrogel with excellent plugging ability for cement microcracks triggered by CO 2 . • The mechanical strength of the gel was significantly enhanced by ionic complexation. • The amphoteric structure was formed of hydrogel triggered by CO 2 . • The hydrogel can swell further through amphoteric structure under salts conditions.