This study explored the utilization of waste oxytetracycline fermentation residue (OFR), abundant in nitrogen and organic matter, to prepare in-situ nitrogen-doped porous biochar (activated OFR derived biochar, AOBC) through a coupled pyrolysis process, and investigated the removal of tetracycline antibiotics (TCs) from water with the prepared AOBCs. The physicochemical characterization results showed the characterizations of abundant nitrogen functional groups, high specific surface area (1960.38 m2/g), and the high microporosity (61.6%) for AOBCs. At 25 ℃, the maximum adsorption capacity calculated by Langmuir model of AOBC-3-600 for tetracycline hydrochloride (TC), chlortetracycline hydrochloride (CTC), oxytetracycline hydrochloride (OTC), and doxycycline hydrochloride (DOC) reached 473.00, 293.28, 220.61, and 282.72mg/g, respectively. The superior fit of the pseudo-second-order and Langmuir models indicated that the adsorption mechanism involved both the physical effect (pore filling) and chemical interactions (electrostatic attraction, hydrogen bonding, π-π interaction, and Lewis acid-base interaction). Environmental risk assessments substantiated the absence of residual oxytetracycline and antibiotic resistance genes in the prepared biochar, indicating its application safety. This research provides a sustainable route to simultaneously treat the antibiotic contamination in water and rationally utilize antibiotic fermentation residues.