Sulfamethazine (SMZ) is an ionizable and highly mobile antibiotic which is frequently found in soil and water environments. We investigated the sorption of SMZ onto soils amended with biochars (BCs) at varying pH and contact time. Invasive plants were pyrolyzed at 700 °C and were further activated with 30 % sulfuric (SBBC) and oxalic (OBBC) acids. The sorption rate of SMZ onto SBBC and OBBC was pronouncedly pH dependent and was decreased significantly when the values of soil pH increased from 3 to 5. Modeled effective sorption coefficients (K D,eff) values indicated excellent sorption on SBBC-treated loamy sand and sandy loam soils for 229 and 183 L/kg, respectively. On the other hand, the low sorption values were determined for OBBC- and BBC700-treated loamy sand and sandy loam soils. Kinetic modeling demonstrated that the pseudo second order model was the best followed by intra-particle diffusion and the Elovich model, indicating that multiple processes govern SMZ sorption. These findings were also supported by sorption edge experiments based on BC characteristics. Chemisorption onto protonated and ligand containing functional groups of the BC surface, and diffusion in macro-, meso-, and micro-pores of the acid-activated BCs are the proposed mechanisms of SMZ retention in soils. Calculated and experimental q e (amount adsorbed per kg of the adsorbent at equilibrium) values were well fitted to the pseudo second order model, and the predicted maximum equilibrium concentration of SBBC for loamy sand soils was 182 mg/kg. Overall, SBBC represents a suitable soil amendment because of its high sorption rate of SMZ in soils.