Using MOFs MIL-101-NH2 (Fe) mixed with lignin uniformly as precursors, Carbon-Fe3C/lignin composites were prepared by carbonization for efficient adsorption removal of tetracycline (TC) from wastewater. The doping of lignin in MOFs MIL-101-NH2 (Fe) increased the BET surface area (160.9 m2/g) of the obtained porous carbon materials, made Fe nanoparticles more dispersed on carbon matrix, and brought more defects and oxygen-containing groups as active adsorption sites. As a result, the materials had excellent adsorption performance for TC in a wide pH range, and the maximum adsorption capacity reached 760.36 mg/g when pH was 4.19, which was 2 times higher than that of Carbon-MIL-101-NH2. The mechanism investigation revealed that the adsorption mainly included chemical adsorption (chemical bonds, ion exchange, π-π interaction and electrostatic interaction) and physical adsorption. It was found that the materials also had a good adsorption effect on tetracycline hydrochloride, oxytetracycline and chlortetracycline (>350 mg/g) and heavy metal Cr(VI) (164 mg/g). Significantly, adsorbent had excellent cycle stability and can be easily recovered from water through magnetic separation, ensuring its great potential for practical wastewater treatment.