Hydrophilic copolymer gels were prepared by free-radical copolymerization of 1-vinyl-2-pyrrolidone (NVP) and N-hydroxymethyl acrylamide (HMAm). The ratios of both monomers and crosslinker agent (CA) were varied, and the effect of external stimuli such as pH of the swelling media and inorganic ion interaction were investigated. The gels showed a pH-responsive behavior. The interactions of inorganic ions with the hydrophilic hydrogels were determined as a function of pH, copolymer composition, and variation of the composition crosslinking degree. Additionally, a decrease of the pH of the solution caused a decrease in the equilibrium degree of swelling of the copolymer gels. The capacity to remove several metal ions such as Cu(II), Cr(III), Co(II), Zn(II), Ni(II), Cd(II), and Fe(III) in the aqueous phase was determined by using the liquid-phase polymer-based retention (LPR) technique. In addition, the copolymers and their complexes with transition metal ions were characterized by the monomer reactivity ratios by using the Kelen-Tü dö s method, elemental analysis, FTIR and 1 H-NMR spectroscopy, differential scanning calorimetry, and thermogravimetric analysis. Based on the results of swelling and retention capacity of metal ions of poly(NVP-co-HMAm), it was concluded that the swelling and retention capacity properties of the hydrogels depends on the reaction environment's pH. This is regarded as a functional hydrogel, which could be employed as biodegradable materials for applications in agriculture chemicals and as drug delivery systems.