• CoN x were designed for activating peroxymonosulfate to degrade tetracycline. • CoN x are highly dispersed in the porous matrix with good activation capability. • It can effectively avoid the loss of active ingredient with excellent stability. • Degradation process was contributed by radical and non-radical ROS. • It provides approach for designing efficient and stable metal-based catalysts. Heterogeneous catalyst-mediated activation of peroxymonosulfate (PMS) is considered a promising process for degradation of persistent contaminants in water. In this study, a cobalt-based catalyst (Co–CN) with CoN x sites highly dispersed on a porous carbon nitride carrier was synthesized to activate PMS for degrading tetracycline (TC). Co–CN exhibited extremely fast catalytic rate (kinetic constant of 0.194 min −1 in TC degradation) and excellent organic pollutant degradation ability compared with Fe–CN, Cu–CN, Mn–CN, and previously reported cobalt-based catalysts owing to the advantage of Co species for PMS activation and the high dispersion of active sites. Mechanistic experiments clarified the role of ·OH/SO 4 · – /·O 2 − / 1 O 2 and electron transfer during TC degradation. Density functional theory analysis calculated that the coordination adsorption of PMS with CoN x sites can affect PMS activation. The confinement of N atoms on Co atoms improved the stability of the catalyst. This work provides new insights into the design of efficient and stable metal-based Fenton-like catalysts.