Co3O4 NPs in N-doped porous carbon (Co3O4 NPs@N-PC) materials were prepared by one-pot pyrolysis of a ZIF- 67 powder under N2 atmosphere and followed by oxidation under air atmosphere (200 ◦C) toward promotion catalytic activity and activation of peroxymonosulfate (PMS) to degradation sulfamethoxazole (SMZ). 2-methylimidazole was used as a nitrogen source and a competitive ligand for the synthesis of Co3O4 NPs@N-PC, which in addition to affecting nucleation and growth of the crystal, promotes the production of active Co–N sites. Co3O4 NPs@N-PC nano-architecture has high specific surface areas (250 m2 g− 1) and is a non-toxic, effective and stable PMS activator. The effect of operating parameters including SMZ concentration, catalyst dosage, temperature and pH in the presence of Co3O4 NPs@N-PC was investigated. The Co3O4 NPs@N-PC composite showed superior performance in activating PMS over a wide range of pH (2–10) and different temperatures so that complete degradation of SMZ (50 μM, 100 mL) was achieved within 15 min. The role of Co2+/Co3+ redox system in the mechanism before and after PMS activation was determined using XPS analysis. Surface-generated radicals led to the degradation of SMZ, in which the SMZ degradation rate attained 0.21 min− 1 with the mineralization of 36.8%. The feasible degradation mechanism of SMZ was studied in the presence of different scavengers and it was revealed that the degradation reaction proceeds from the radical/non-radical pathway and in this process most of the SO4•− and •OH radicals are dominant. The recoverability and reuse of Co3O4 NPs@N-PC were evaluated to confirm its stability and potential for SMZ degradation and it was observed that the catalyst maintains its catalytic power for at least 5 cycles.