Abstract The composite Fenton catalyst was prepared by attaching MgCo 2 O 4 to the surface of g‐C 3 N 4 using a one‐pot method after preparing MgCo 2 O 4 through co‐precipitation. The microstructure of the composites was analyzed using X‐ray diffraction (XRD) and other characterization methods. The catalytic activity of the composites towards tetracycline (TC) was studied, and a possible catalytic mechanism was proposed. The experimental results indicate that the degradation of TC by MgCo 2 O 4 @g‐C 3 N 4 reached almost 99.0 % within 30 min in the presence of PMS and visible light. The combination of MgCo 2 O 4 and g‐C 3 N 4 improved the absorption of visible light, and the energy level‐matched heterojunction facilitated the separation of photogenerated electrons and holes, accelerating the redox cycle of ≡Co 3+ /≡Co 2+ . The free radical quenching experiment confirmed that the main active substances were free radical ⋅O 2 − and 1 O 2 . The one‐step synthesis of composite catalysts exhibits high catalytic performance and good stability, offering a potential solution for the efficient treatment of tetracycline wastewater.