The presence of a considerable quantity of metal ions in N-methylpyrrolidone (NMP) applied for the cleaning of electronic devices, especially chips, results in a breakdown effect, thus affecting their overall durability and performance. Here, hydrogel that rich in O, N, and S active sites was prepared, which can effectively remove trace amounts of Cu (II) from N-methylpyrrolidone. The material was synthesized through a one-pot crosslinking and ion exchange method and is named SLH. The physicochemical properties and adsorption experiments were conducted. It was found that SLH-2 exhibited outstanding Langmuir maximum adsorption capacity of 136.99 mg/g at an initial Cu (II) concentration of 200 mg/L. By utilizing SLH-2 in electronic grade adsorption experiments, concentration of trace Cu (II) decreased from 12.3 μg/L to 5.39 μg/L. Additionally, concentration of Zn, Fe, Mg, and Ni significantly reduced to less than 1 μg/L, with –NH2 and –COOH playing crucial roles in the adsorption process. The research results indicate that predominant adsorption mechanisms are surface coordination and ion exchange. The adsorption energy between active functional groups and Cu (II) was calculated using density functional theory (DFT), revealing an affinity order of –COOH > –SO3H > –NH2 > –OH. This work not only developed an adsorbent for capturing trace Cu (II), but also provided new strategies for the removal of metal ions in wet chemicals.