Engineering high-performance N-doped carbon catalysts for peroxymonosulfate (PMS) activation and elucidating their activation mechanism are crucial for the degradation of emerging pollutants. In this study, we propose a novel self-template carbonization strategy (NSCS) based on a N-containing conjugated microporous polymer (NCMP, poly(triphenylamine)) to fabricate high-performance N-doped porous carbon catalysts. Owing to the unique N-mediated catalytic sites within the confined micropores of the NCMP precursor, the NSCS approach enables the investigation of reactive oxygen species evolution and their formation mechanisms as carbonization temperature increases from 200 to 1400 °C. The catalyst carbonized at 1000 °C exhibited high degradation activity (k = 0.170 min