Pt is the most effective and widely used electrocatalyst for the oxygen reduction reaction (ORR) in fuel cells; however, its scarcity and high cost pose a great challenge to the commercialization of the fuel cell technology. N-doped carbon materials have been regarded as one of the most promising Pt-alternative catalysts. In this work, the N-doped ordered mesoporous carbon was synthesized by the nanocasting method using SBA-15 as the template. The effect of the pyrolysis conditions (pyrolysis temperature, pyrolysis duration, and ramp rate) on this material was investigated. N2 adsorption-desorption isotherms, X-ray photoelectron spectroscopy, and Raman spectroscopy were used to investigate the intrinsic properties of the resultant materials. Cyclic voltammetry and rotating ring-disk electrode were used to investigate the electrochemical behavior for ORR in an alkaline medium. It was found that the resultant mesoporous carbon materials exhibit high electrical conductivity, high specific surface area, and unique pore structure. The pyrolysis temperature was the most important parameter in determining the thermodecomposition of the carbon precursor, and the microstructure, elemental composition, and chemical configuration of the resultant mesoporous carbon materials. To achieve reasonable electrocatalytic activity and selectivity, a high pyrolysis temperature above 800 °C is required for effective N doping to form active sites and for graphitization to facilitate charge transfer, whereas the pyrolysis duration and ramp rate have a much less significant effect. This indicates that both the surface composition/structure and consequent electrochemical properties are more dependent on the thermodynamics than the kinetics during the pyrolysis process. Finally, the optimal N-doped ordered mesoporous carbon catalyst showed superior electrochemical activity for ORR than the commercial Pt catalyst and is promising for fuel cell and metal–air battery applications.