In carbon-based oxygen reduction reaction (ORR) catalysts, metal-free nitrogen-doped carbon-based materials generally have higher catalytic stability compared to metal catalysts with reduced catalytic activity due to the occurrence of metal agglomeration during the catalytic reaction. In this paper, a metal-free nitrogen-doped carbon-based ORR catalyst NCOH5-900 with a half-wave potential of 0.846 V and onset potential of 0.94 V was prepared using coal as the carbon source, dicyandiamide as the nitrogen source and KOH as the activator. The material has good ORR catalytic performance with half-wave potential and onset potential comparable to Pt/C catalyst with the same mass loading, with better resistance to methanol toxicity and catalytic stability. The physical and chemical properties of the prepared catalyst were controlled by adjusting the amount of nitrogen doping and activation temperature to establish the relationship between the material structure and the ORR performance. The results suggest that for the metal-free nitrogen-doped carbon-based material, the good ORR catalytic performance is attributed to the abundant edge defects, high graphitization, good mixed structure of micro/mesopores, large nitrogen content, and high ratio of pyridine to graphitic nitrogen. Finally, the catalytic mechanism of NCOH5-900 for ORR is investigated using in-situ attenuated total reflection Fourier infrared (ATR-FTIR) and in-situ Raman, confirming the four-electron reduction process of O2 via a continuous dual step of two-electron transfer process.