In the present study, a polymeric nanocomposite, CoFe2O4@DHBF, was fabricated using 2,4 dihydroxybenzaldehyde and formaldehyde in basic medium with CoFe2O4 nanoparticles. The fabricated nanocomposite was characterized using FTIR, TGA, XRD, SEM, TEM, and XPS analyses. The analytical results revealed that the magnetic nanocomposite was fabricated successfully with high surface area 370.24 m2/g. The fabricated CoFe2O4@DHBF was used as an efficient adsorbent for the adsorption of U(VI) and Eu(III) ions from contaminated water. pH, initial concentration, adsorption time, and the temperature of the contaminated water solution affecting the adsorption ability of the nanocomposites were studied. The batch adsorption results exposed that the adsorption capacity for the removal of U(VI) and Eu(III) was found to be 237.5 and 225.5 mg/g. The adsorption kinetics support that both the metal ions follow second order adsorption kinetics. The adsorption isotherm well fits with the Langmuir adsorption isotherm and the correlation coefficient (R2) values were found to be 0.9920 and 0.9913 for the adsorption of U(VI) and Eu(III), respectively. It was noticed that the fabricated nanocomposites show excellent regeneration ability and about 220.1 and 211.3 mg/g adsorption capacity remains with U(VI) and Eu(III) under optimum conditions.