By in situ generation of hydrazone bonds, a composite hydrogel that combines poly(N-isopropylacrylamide) and carboxymethyl cellulose and is reinforced with PDA nanoparticles was successfully prepared for injectable use, and was employed to treat metal ions in aqueous solutions. The composite hydrogels presented desirable compressive strength and anti-fatigue performance. The adsorption capacities of Cu2+, Pb2+ and Cd2+ reached high values of 193.8, 168.8 and 112.6 mg/g, respectively, in a single-ion adsorption system, due to the plentiful adsorptive sites on the hydrogels. The adsorption kinetics followed the Pseudo-second-order model, while the adsorption isotherm adhered to the Langmuir model. Besides, the hydrogels showed slightly higher selectivity for Cu2+ in an adsorption system involving multiple ions, and exhibited good reusability, enabling it to be employed repeatedly as a recyclable adsorbent. The analysis of the mechanism indicated that ion exchange, electrostatic interaction, chemical adsorption and coordination effect might occurred between metal ions and functional groups in hydrogel matrix and PDA nanopartiles. Moreover, the Cu2+-adsorbed hydrogels could act as a scaffold for the on-site generation of Cu nanoparticles. With the Cu nanoparticles, the hydrogels showed catalytic activity of ∼ 80 % conversion of 4-nitrophenol (1 mmol) to 4-aminophenol in 30 min, validating the dual functional properties for both adsorption and catalytic purposes in the treatment of wastewater.