In this work, tannic acid was selected as a green cross-linking agent to cross-link carboxymethyl chitosan to prepare a magnetic adsorbent (CC-OTA@Fe3O4), 3 O 4 ), which was used to remove methylene blue (MB) and Cu2+. 2 + . CCOTA@Fe3O4 3 O 4 was characterized by FTIR, 13 C NMR, XRD, VSM, TGA, BET and SEM. The adsorption behavior was studied using various parameters such as pH value, contact time, initial concentration of MB and Cu2+, 2 + , and temperature. The results showed that adsorption of MB and Cu2+ 2 + followed the pseudo-second-order model and the Sips model. The maximum adsorption capacities were determined to be 560.92 and 104.25 mg/g MB and Cu2+ 2 + at 298 K, respectively. Thermodynamic analysis showed that the adsorption is spontaneous and endothermic in nature. According to the results of FTIR and XPS analyses, the electrostatic interaction was accompanied by pi-pi - pi interaction and hydrogen bonding for MB adsorption, while complexation and electrostatic interaction were the predominant mechanism for Cu2+ 2 + adsorption. Furthermore, CC-OTA@Fe3O4 3 O 4 displayed remarkable stability in 0.1 M HNO3, 3 , exhibited promising recyclability, and could be easily separated from aqueous solutions in the magnetic field. This study demonstrates the potential of CC-OTA@Fe3O4 3 O 4 as an adsorbent for the removal of cationic dyes and heavy metals from wastewater.