Sustainable water management is crucial for reducing environmental impact, improving public health, and contributing to the United Nations' Sustainable Development Goals (SDGs). This study introduces a novel hydrogel composite membrane for wastewater treatment and desalination. The membrane was fabricated by cross-linking kappa-carrageenan (kappa C) with nano-zerovalent iron (nZVI) using polyethyleneimine (PEI) to produce a porous structure hydrogel membrane of high water flux and contaminant rejection via adsorption and reduction processes, leveraging the properties of kappa carrageenan and nZVI. Experiments showed an increased water flux and rejection rate for the hydrogel membrane by increasing the pressure from 10 psi to 30 psi. In initial tests with 2 g/L of NaCl or MgSO4, the membrane exhibited 98 % rejection of divalent Mg2 + ions and 90 % rejection of Na+ ions at 30 psi and 17.98 L/M2H water flux. The hydrogel's contaminant separation mechanisms involve a combination of size exclusion, electrostatic repulsion, and hydrophilic-hydrophobic polarity rejection. Leachate wastewater treatment by the membrane achieved 11 L/m2h water flux at 30 psi and an outstanding rejection rate of more than 98 % for divalent ions, such as Li+, Pb2+, Cd2+, Co2+, and Cu2+, and 61 % rejection of organic matter of 165.68 mg/L initial concentration. Due to membrane fouling, the water flux decreased in the second and third filtration cycles, while membrane rejection remained unchanged. The dead-end filtration mode facilitated metal ions recovery at the end of the experiments, recording 68.32 % and 66.31 % recovery for lead and lithium ions. This novel hydrogel provides a promising and sustainable solution for water purification and valuable heavy metals recovery from solutions to support the circular economy.