For harmless and resource usage of residual sludge from the sewage treatment plant, magnetic sludge biochar (MBC) was prepared by loading Fe3O4 particles onto the surface of sludge biochar (BC) using the co-precipitation method, and BC was produced by pyrolysis of residual sludge as a comparison. Effects of biochar dosage, initial concentration of TC, pH, and ionic strength on the adsorption of tetracycline (TC) by MBC were investigated. The physicochemical properties and TC adsorption mechanisms of MBC were characterized by scanning electron microscope (SEM), Brunner-Emmet-Teller (BET), laser particle size distributor (LPSD), vibrating sample magnetometer (VSM), X-ray diffraction (XRD), X-ray photoelectron spectroscopy (XPS) and Fourier transform infrared spectrometry (FTIR). The results revealed that compared to BC, MBC has an increased surface area and pore volume, successfully loaded Fe3O4 particles on its surface, and the saturation magnetization was 8.02 emug(-1). The removal rate of TC by MBC reached 98% when the dosage of MBC was 1.5 gL-1, pH was 7, the initial concentration of TC was 30 mgL-1, and absorption time was 8 h. The initial TC concentration and pH have a significant impact on the adsorption of TC by MBC, while ionic strength has a relatively minor influence. The adsorption kinetics was consistent with the pseudo-second-order model, and indicating that the above adsorption was the chemisorption on the monolayer. The isotherm data were well fitted with the Langmuir model and showed the maximum adsorption capacity of 168.35 mg g(-1) (298 K), 184.07 mg g(-1) (308 K), and 204.20 mg g(-1) (318 K), respectively. In addition, according to the XPS and FTIR characterization of MBC before and after TC adsorption, the main adsorption mechanisms of TC absorption by MBC were surface complexation, pi-pi interaction and hydrogen bonding and pore filling. After 5 cycles of regeneration, the adsorption capacity of TC by MBC decreased from 52.4 mgg(-1) to 37.8 mgg(-1), a mere reduction of 27.86%, indicating that the reuse potential of MBC on TC absorption is commendable.