Constructing efficient electrocatalysts for the oxygen reduction reaction (ORR) is crucial for the commercialization of metal-air batteries. Iron oxide-based catalysts exhibit promising potential for ORR. However, addressing the issue of inferior catalytic performance is essential, and a comprehensive understanding of the catalytic mechanism of iron oxide-based catalysts is also lacking. In this study, we present Fe3O4 nanoparticles encapsulated in N-doped graphitic carbon layers (NGC) hosted by hierarchically porous carbon (Fe3O4@NGC), achieved through a facile dual melt-salt template strategy. The encapsulation of Fe3O4 nanoparticles protects them from corrosion and exfoliation, endowing the catalysts with superior stability. Density functional theory (DFT) calculations discover that the electronic interaction between Fe3O4 nanoparticles and N-doped graphitic carbon layers induces directional interfacial electron transfer, which effectively modulates the surface electronic structure to improve the binding ability to O2, weaken the OO bond, and optimize the adsorption of intermediates, thus boosting the intrinsic activity. DFT unveils that the C atoms nearest to graphitic-N in NGC are active sites. Finally, the synergistic effects of Fe3O4 nanoparticles and NGC result in outstanding ORR performance and superior stability and methanol tolerance of Fe3O4@NGC, with a half-wave potential of 0.89 V, surpassing that of Pt/C by 50 mV. Fe3O4@NGC also shows better performance than Pt/C when used as the air-electrode catalyst in zinc-air battery.