Reasonable design of an economical and efficient versatile oxygen electrocatalyst for the oxygen reduction reaction (ORR) and oxygen evolution reaction (OER) is urgently needed in metal-air batteries and fuel cells. Herein, a Ce-doped Fe-NC/ Fe 3 C (Ce/Fe-NC/Fe 3 C-P) porous nanosheet catalyst was prepared from the pyrolysis of a two-dimensional ZIF assisted with NaCl molten salt. Under alkaline media, the ORR half-wave potential (E 1/2 ) is 0.87 V, and the OER overpotential is 389 mV. The Zn-air batteries (ZABs) assembled with the Ce/Fe-NC/Fe 3 C-P catalyst demonstrate a maximum power density (P M ) of 184 mW cm −2 . Under acidic media, the E 1/2 of the ORR is 0.78 V, and the P M is 347 mW cm −2 in the proton exchange membrane fuel cell (PEMFC) cathode. The enhanced catalytic activity and stability benefit from the abundant catalytic active sites (Fe 3 C, Fe−N X , Ce− N) by Fe and Ce doping, hierarchical porous structure, and relatively higher graphitization originating from the molten NaCl assisting pyrolysis.