Porous carbon materials doped with nano-sized transition metal carbides and/or metal-nitrogen coordinative sites are promising oxygen reduction electrocatalysts. The doping of such functionalities in carbon materials with desirable concentration, ultra-small size and stable configuration is still a challenge. In this paper, by grinding and pyrolyzing solid mixtures of an amino acid, an iron salt, and a mesoporous silica template, we demonstrate a solvent-free assembly approach to directly anchor both Fe3C nanoclucters and FeNx sites into nitrogen-doped ordered mesoporous graphitic carbon materials. The carbonaceous electrocatalysts are imparted with several fascinating features, namely, highly dispersed ultra-small Fe3C nanoclusters of 1–3 nm, well-anchored FeNx sites, nitrogen-doped well-graphitized carbon frameworks, and ordered mesopores (∼5.4 nm) and high surface areas (>1000 m2/g), respectively. The combination of these features makes these electrocatalysts exceptional for oxygen reduction reaction under both alkaline and acidic electrolytes, i.e. superior catalytic activities (e.g. onset and half-wave potentials up to 1.00 and 0.89 V vs. the reversible hydrogen electrode in alkaline solution), outstanding stabilities and excellent methanol tolerance, respectively. An in-depth study has been conducted to identify and characterize the key active sites in these electrocatalysts and to elucidate several important influencing factors to optimize the catalytic performance.