In this study, nano-sized CoFe2O4 composites were prepared through co-precipitation process. Then the phosphorus-doped strong magnetic graphitic carbon nitride hybrids composites (P–CoFe2O4@GCN) was stemmed from the CoFe2O4 composites via the thermal polymerization method. The TEM results show that the CoFe2O4 nanoparticles have been successfully embedded into the graphitic carbon nitride (GCN). The BET specific surface area of P–CoFe2O4@GCN-1 could reach 36.91 m2/g, which was 5.38 times higher than that of GCN. Thus, it provided sufficient reaction active sites to enhance the photocatalytic activity for tetracycline (TC) decomposition. The results from the photocatalytic experiments showed that the degradation efficiency of TC by P–CoFe2O4@GCN-1 could reach 96.2% within 60 min, which is 3.19 times higher than that of GCN. The h+, O2•- and •OH radicals detected by the electron spin resonance (ESR) were responsible for the TC decomposition in the photocatalytic reaction system. Persulfate (PS) can further activate the hybrid mixture system, and the fitting model predicted by the response surface methodology (RSM) indicated that the maximum tetracycline removal could reach 99.6% within 30 min. In addition, the degradation intermediates of TC were detected by HPLC-MS and the photodegradation mechanism was discussed.