In this work, the mechanical properties of hydrogels based on linear polyethyleneimine (PEI) chemically crosslinked with ethyleneglycoldiglycidyl ether (EGDE) were improved by the ionic crosslinking with sodium tripolyphosphate (TPP). To this end, the quaternization of the nitrogen atoms present in the PEI structure was conducted to render a network with a permanent positive charge to interact with the negative charges of TPP. The co-crosslinking process was studied by 1H high-resolution magic angle spinning (1H HRMAS) NMR and X-ray photoelectron spectroscopy (XPS) in combination with organic elemental analysis and inductively coupled plasma mass spectrometry (ICP-MS). In addition, the mobility and confinement of water molecules within the co-crosslinked hydrogels were studied by low-field 1H NMR. The addition of small amounts of TPP, 0.03 to 0.26 mmoles of TPP per gram of material, to the PEI-EGDE hydrogel resulted in an increase in the deformation resistance from 320 to 1080%, respectively. Moreover, the adsorption capacity of the hydrogels towards various emerging contaminants remained high after the TPP crosslinking, with maximum loading capacities (qmax) of 77, 512, and 55 mg g−1 at pH = 4 for penicillin V (antibiotic), methyl orange (azo-dye) and copper(II) ions (metal ion), respectively. A significant decrease in the adsorption capacity was observed at pH = 7 or 10, with qmax of 356 or 64 and 23 or 0.8 mg g−1 for methyl orange and penicillin V, respectively.