To activate peroxymonosulfate (PMS) and degrade methylene blue (MB), cobalt and nitrogen‐doped porous carbon composite catalysts were prepared through pyrolysing zeolitic imidazolate framework ZIF‐9 and dicyandiamide (DCDA) at 700–900 °C with various mass ratios. Powder X‐ray diffraction, scanning electron microscopy, transmission electron microscopy, and Brunauer‐Emmett‐Teller results showed that Co, porous carbon and carbon nanotubes (CNTs) co‐existed in the catalyst prepared at 800 °C with a ZIF‐9/DCDA ratio of 1 : 3. Thermogravimetric analysis suggested that CNT@ZIF‐800 had a higher ratio of graphitic to turbostratic carbon than CNT@ZIF‐700. It had degraded 94.8 % MB within 30 min, which was about 1.9 times faster than its counterpart C‐ZIF‐800. It also showed faster degradation rates towards Congo red (98.5 %, 5 min) and slower rates towards rhodamine B (90.7 %, 30 min) than MB. Furthermore, XPS revealed that it had 14.5 % more Co−Nx/pyridinic‐N active sites than C‐ZIF‐800. EPR suggested that 1O2 might be the primary catalytic species whereas the SO4−⋅ and ⋅OH the secondary ones. The formation mechanism of such active species might be originated from the synergistic activation of PMS by CNTs, Co−Nx/pyridinic‐N and abundant Co sites in the CNT@ZIF‐800. This work not only provided efficient Fenton‐like catalysts for MB degradation, but also clarified the catalytic mechanism.