Heteroatom doping can change the chemical environment of carbon-based nanomaterials and improve their catalytic performance. Exploring the structure-catalytic activity relationship of heteroatom-doped carbon-based materials is of great significance for studying catalytic mechanisms and designing highly efficient catalysts, but remains a significant challenge. Recently, reactive oxygen species (ROS)-triggered electrochemiluminescence (ECL) has shown great potential for unveiling the mechanism by which heteroatom-doped carbon-based materials catalyze the oxygen reduction reaction (ORR), owing to the high sensitivity of these materials to the properties of the electrode surface. Herein, two kinds of heteroatom-doped porous carbon (denoted as NP-C and N-C) are synthesized and analyzed by monitoring the cathodic ECL of luminol-H2O2 in the low negative-potential region. P, N-doped NP-C exhibitsbetter catalytic ability for activating H2O2 to generate large amounts of •OH and O2 •-, compared with N-C. A sensitive antioxidant-mediated ECL platform is successfully developed for detecting the antioxidant levels in cells, exhibiting considerable potential for evaluating the antioxidant capacity. The relationship between the structure and catalytic mechanism of heteroatom-doped carbon-based materials is successfully explored using ECL, where this method can be universally applied to carbon-based materials.