The large-scale application of Zn-air battery requires the development of efficient, low-cost, and stable bifunctional electrocatalysts for the oxygen evolution reaction (OER) and oxygen reduction reaction (ORR). Herein, an electrocatalyst of a Co/MoC-nanoparticles embedded N-doped carbon (Co/MoC@N-C) was prepared via the in-situ encapsulation of Co2(CO)8 and Mo(CO)6 in ZIF-8 using ball-milling, followed by pyrolysis under an Ar atmosphere. When used as a bifunctional electrocatalyst, the as-prepared Co/MoC@N-C showed an ORR half-wave potential of 0.824 V in an alkaline medium and an overpotential of only 290 mV for the OER at 10 mA cm−2, which was 70 mV lower than RuO2. The Co/MoC@N-C was also evaluated as a cathode in a solid-state Zn-air battery and delivered a higher peak discharge power density and better cycling stability (over 1600 min) than Pt/C-RuO2. Most importantly, our work provides a new strategy to prepare bifunctional catalysts and promotes their applications in the energy conversion field.