Zinc-air batteries (ZABs) are attractive electrochemical energy storages for advanced applications across various fields, but their performance in terms of energy density and stability is tied to the efficiency and durability of a bifunctional cathode structure that governs oxygen evolution reaction (OER) during discharging and oxygen reduction reaction (ORR) during charging. Here, we present a bifunctional cathode based on a NiFe core encapsulated by a porous pyridinic N-doped graphitic carbon shell (NiFe/NC), which enables both ORR/OER for high performance in ZABs. The NC shell is rich in pyridinic/graphitic N sites and features ion-accessible pores, while the NiFe alloy core contains high-valent Ni<sup>2+</sup>/<sup>3+</sup> and Fe<sup>2+</sup>/<sup>3+</sup> sites. Pyridinic N sites aid in the adsorption of reduced oxygen species while suppressing H<sub>2</sub>O<sub>2</sub> formation, graphitic N-doped sites promote electron transport, and rich pores accelerate ion transport for efficient ORR. Besides, nucleophilic Ni<sup>2+</sup>/<sup>3+</sup> and Fe<sup>2+</sup>/<sup>3+</sup> sites and loose NiFe packing promote OER by facilitating electron and ion transport. Moreover, the ZAB with the NiFe/NC cathode achieves a notable energy density of 879 Wh kg<sup>-1</sup> and excellent stability over 1000 cycles without significant voltage degradation, outperforming the Pt/C+RuO<sub>2</sub>-based ZAB that delivers an energy density of 844 Wh kg<sup>-1</sup> and degrades over 181 cycles.