Electrocatalysts with high cost-effectiveness for the oxygen reduction reaction (ORR) are essential for fuel cells (FC) and Zn-Air batteries (ZAB), which need highly active sites and suitable carbon substrates to accelerate the charge transfer kinetics. Herein, a simple and extensible method using ball milling and space-confinement pyrolysis is reported to prepare a series of transition metals and N-C catalysts (M-NLPC), which possess three-dimensional porous carbon substrates and dense active sites for efficient ORR. M-NLPC catalysts (especially Fe-NLPC) exhibit outstanding ORR activity with a half-wave potential (E1/2, 0.88 V) in an alkaline medium, high stability, and strong methanol resistance. The M-N4 sites are proven to be the active centers in M-NLPC by theoretical calculation, and methanol molecules are more likely to desorb than react on the Fe-N4 sites, which is the origin of the inactivity for the methanol oxidation reaction (MOR). Furthermore, Fe-NLPC was applied to membraneless alkaline direct methanol FC (DMFC) in practice, exhibiting outstanding performance. Meanwhile, the Fe-NLPC-based ZAB also shows excellent electrochemical performance.