In this study, cobalt doped graphitic carbon nitride (Co-CN) was prepared and applied as a catalyst to activate peracetic acid (PAA) for sulfamethoxazole (SMX) degradation at neutral pH. PAA could be efficiently activated by Co-CN resulting in the efficient degradation of SMX. Characterization results of fresh and used Co-CN suggested that cobalt was successfully doped in graphitic carbon nitride (g-C3N4) through chemical bonding (Co-N bond) and the surface cobalt species in Co-CN (i.e., [triple bond, length as m-dash]Co(ii) and [triple bond, length as m-dash]Co(iii)) were the main activators for PAA. Organic radicals (i.e., CH3C(O)O˙ and CH3C(O)OO˙) were proved to be the dominant reactive species for SMX removal in the Co-CN/PAA system by radical scavenging experiments. The increase of cobalt doping content, PAA dosage or Co-CN dosage could accelerate SMX degradation and the neutral condition was highly favorable to SMX removal in Co-CN/PAA system. Co-CN exhibited a good stability and reusability for PAA activation in degrading SMX. Four possible degradation pathways of SMX (i.e., hydroxylation, nitration, bond cleavage and coupling reaction) were proposed in the Co-CN/PAA system according to eight identified transformation products.