Adsorption of inorganic mercury [Hg(II)] and organic methylmercury [MeHg(II)] ions onto dye‐affinity agrowaste (dye‐AW) was investigated. The dye‐affinity adsorbents were prepared by the chemical‐thermal reaction between the agrowaste (AW) and dye solutions [i.e., Reactive Red 120 (RR), Reactive Black B (RB), Methylene Blue (MB), and Methyl Orange (MO)] under an alkaline condition. An almost perfect removal of Hg(II) was observed for all adsorbents, while for MeHg(II), the dye‐affinity adsorbents have a higher removal efficiency than a pristine adsorbent. The maximum adsorption capacity (Qe, max) of mercury ions onto the Reactive Red 120‐modified AW (RR‐AW) was 2.60 mmol g−1 for Hg(II) and 0.76 mmol g−1 for MeHg(II). The adsorption rate of Hg(II) was faster than MeHg(II), and both kinetic data followed the pseudo‐second order kinetic model with the diffusion steps controlled by the film diffusion. The regenerated adsorbent showed very encouraging results especially toward Hg(II). The promising results were also obtained by using oilfield produced water (OPW) and natural gas condensate (NGC) samples. These studies finally demonstrated that the agricultural wastes initially loaded with dyes have the potential to be good mercury adsorbents. © 2018 American Institute of Chemical Engineers Environ Prog, 38: S54–S67, 2019