The present research investigates the performance of bentonite clay@biochar@Fe3O4 nanocomposite in removing mercury ions (Hg2+) from aqueous media. The physical and structural properties of bentonite clay@biochar@Fe3O4 were determined using Brunauer-Emmett-Teller (BET), vibrating-sample magnetometer (VSM), transmission electron microscopy (TEM), energy-dispersive X-ray (EDX), scanning electron microscopy (SEM), Fourier-transform infrared spectroscopy (FTIR), X-ray powder diffraction (XRD), and Raman analyses. The highest uptake efficiency of Hg2+ was obtained at pH 6, Hg2+ concentration of 10 mg/L, contact time of 80 min, and the composite dose of 1.5 g/L. Under these conditions, the uptake efficiency of bentonite clay@biochar@Fe3O4 and bentonite clay was obtained as 98.78% and 97.67%, respectively, which are remarkable values. Also, the qmax values in Hg2+ removal using bentonite clay@biochar@Fe3O4 and bentonite clay were obtained as 66.66 and 60.98 mg/g, respectively. Moreover, the uptake process of Hg2+ ions using bentonite clay@biochar@Fe3O4 nanocomposite and bentonite was spontaneous, physical, favorable, and exothermic. Besides, the impact of various divalent ions such as Co2+, Cu2+, Pb2+, Ni2+, and Zn2+ on the removal efficiency of Hg2+ was studied. The results showed that Co2+ and Zn2+ ions have the highest and lowest interference effect in Hg2+ removal, respectively. Also, the reusability of both adsorbents showed that they have high stability and can be used for at least 5 cycles with high uptake efficiency. Additionally, the removal efficiency of chemical oxygen demand (COD), biochemical oxygen demand (BOD5), Hg2+, As3+, and As5+ from real wastewater using bentonite clay@biochar@Fe3O4 was obtained as 37.5%, 28.9%, 65%, 60.5%, and 50%, respectively, indicating its remarkable performance.