High-density nitrogen-doped porous carbon catalysts have been regarded as promising alternatives to precious metals in proton-exchange membrane fuel cells (PEMFC) and metal–air batteries based on the oxygen reduction reaction (ORR). We herein synthesized high-density pyridinic and graphitic N-doped hollow carbon nanospheres (G&P N-HCS) using a high-yield amino-1H-tetrazole (ATTZ) via a self-sacrificial-template method. The synthesized G&P N-HCS shows a high N content (15.2 at%), in which pyridinic (Pr) and graphitic (Gr) N are highly reactive for the ORR catalysis. We found that the half-wave potential and limiting current density of G&P N-HCS are comparable to the state-of-the-art Pt/C, whereas its cyclic durability is much superior to that of Pt/C. Experimental results indicate that an optimal ratio (1 : 1) between Gr N and Pr N in G&P N-HCS exhibits the highest ORR performances, rather than Gr N-dominated N-HCS or Pr N-dominated N-HCS. Notably, N-HCS containing only Gr N and Pr N has poor catalytic performance for ORR in alkaline electrolytes. Density functional theory (DFT) simulations untangle the catalytic nature of Pr and Gr N and decipher the relations between the N type(s) and total N content required for the ORR catalysis. This study provides a new way to design efficient N-doped porous carbon-enriched active sites, and solves the cathode catalyst in the commercialization of PEMFC and metal–air batteries.