This work aims at the preparation of AC from chemical activation (H3PO4, KOH, and HCl) and physical activation (thermal treatment under N2 atmosphere at 500 and 700°C) of Astragalus Mongholicus (AM) (a low-cost bio-adsorbent and agro-industrial waste), used as carbon precursor. The obtained materials were further applied in the adsorption of diclofenac (DCF) from water/wastewater. The physicochemical properties of the as-prepared ACs and commercial activated carbons (CAC) were evaluated by SEM, XRD, FT-IR, and BET analyses, revealing the high surface area and mesoporous proportion of AC when compared to CAC . Adsorption results showed that the efficiency of AC-700 °C (774 m2 g−1) for DCF removal (92.29%) was greater than that of AC-500 °C (648 m2 g−1, 83.5%), AC-H3PO4 (596 m2 g−1, 80.8%), AC-KOH (450 m2 g−1, 59.3%), AC-HCl (156 m2 g−1, 29.8%) and CAC (455 m2 g−1, 67.8%). The optimization of effective parameters in adsorption was examined at a laboratory-scale using the selected AC-700 °C. The Langmuir isotherm and the pseudo-second-order model fitted well the experimental data. The regeneration efficiency was maintained at 96% (DI-water) and 97% (heating) after three cycles. Besides, genetic programming (GP) and molecular dynamics (MD) simulations were applied to predict the adsorption behavior of DCF from aqueous phase as well as in the ACs structure. It was found that the adsorption mechanisms involved were electrostatic interaction, cation–π interaction, and π–π electron interaction.