This work involved the preparation of pristine and iron nanoparticle-loaded biochar from a water chestnut shell to remove diclofenac sodium (DCF) containing effluent of pharmaceutical origin. To create suitable forecasting equations for the modelling of the DCF adsorption onto the adsorbent, response surface methodology (RSM) was used. The parameters, e.g. pH, adsorbent mass, DCF concentration and contact time, were used for the modeling of adsorption. The RSM model predicts that for 98.0% DCF removal, the ideal conditions are pH 6, an adsorbent dose of 0.5 g L-1, and a contact time of 60 min with an initial adsorbate concentration of 25 mg L-1 at 303 K. The maximum capacity deduced from the Langmuir model was 75.9 mg g-1 for pristine water chestnut shell biochar (pWCBC) and 122.3 mg g-1 for magnetically modified nano-Fe2O3 biochar (mWCBC). Under equilibrium conditions, the Langmuir model was the best-suited model compared to the Temkin and Freundlich models. The adsorption data in this investigation efficiently fitted the pseudo-second-order model, emphasizing that chemisorption or ion exchange processes may be involved in the process. The WCBC demonstrated recyclability after 10 cycles of repeated adsorption and desorption of DCF. A combined coagulation adsorption process removed COD, NH3-N, NO3-, PO43-, and DCF by 92.50%, 86.41%, 77.57%, 84.54%, and 97.25%, respectively. This study therefore shows that coagulation followed by adsorption onto biochar can be a cost-effective substitute for conventional pharmaceutical wastewater treatment.