In recent years, metal-organic frameworks (MOFs) as metal-based carbon materials have been widely concerned with the application of activated perxymonosulfate(PMS) to degrade antibiotics. However, constructing MOFs-derived materials with excellent dispersion, highly exposed metal active sites, and environmental friendliness remains a challenge. This paper reports for the first time the in-situ formation of nitrogen-rich Co-doped C3N5 (Co-C3N5) materials using a cobalt-based metal-organic framework (Co-MOFs), which has highly dispersed metal sites that are conducive to the activation of PMS. The forbidden bandwidth value of Co-C3N5 photocatalyst is as low as ∼1.20 eV, which could completely degrade chlortetracycline hydrochloride (CTC) with the initial concentration of 30 mg/L within 6 min under a light source of 50 W LED lamp. The results indicate that efficient photoelectron separation and transport are key factors in the activation and degradation of CTC by PMS, involving both free radical and non-free radical degradation processes. Meanwhile, the skeletal structure of MOFs and the triazine ring of C3N5 were retained, enhancing the stability of the photocatalyst and reducing the leaching of cobalt Finally, the seed germination experiment of Chinese cabbage showed that the treated CTC could increase the root length of Chinese cabbage seedlings by 10.1∼42.9%, which proved that the materials had no toxic effect on environment and could provide carbon and nitrogen source for plant growth. Based on this, this study proposes a novel approach for the development of MOFs-derived carbon photocatalysts that exhibit excellent dispersion and highly exposed metal active sites.