Recently, electrocatalysts for oxygen reduction reaction (ORR) as well as oxygen evolution reaction (OER) hinged on electrospun nanofiber composites have attracted wide research attention. Transition metal elements and heteroatomic doping are important methods used to enhance their catalytic performances. Lately, the construction of electrocatalysts based on metal-organic framework (MOF) electrospun nanofibers has become a research hotspot. In this work, nickel-cobalt zeolitic imidazolate frameworks with different molar ratios (NixCoy-ZIFs) were synthesized in an aqueous solution, followed by NixCoy-ZIFs/polyacrylonitrile (PAN) electrospun nanofiber precursors, which were prepared by a simple electrospinning method. Bimetal (Ni-Co) porous carbon nanofiber catalysts doped with nitrogen, oxygen, and sulfur elements were obtained at high-temperature carbonization treatment in different atmospheres (argon (Ar), Air, and hydrogen sulfide (H2S)), respectively. The morphological properties, structures, and composition were characterized by scanning electron microscopy (SEM), transmission electron microscopy (TEM), selected area electron diffraction (SAED), X-ray diffraction (XRD), and X-ray photoelectron spectroscopy (XPS). Moreover, the specific surface area of materials and their pore size distribution was characterized by Brunauer-Emmett-Teller (BET). Linear sweep voltammetry curves investigated catalyst performances towards oxygen reduction and evolution reactions. Importantly, Ni1Co2-ZIFs/PAN-Ar yielded the best ORR activity, whereas Ni1Co1-ZIFs/PAN-Air exhibited the best OER performance. This work provides significant guidance for the preparation and characterization of multi-doped porous carbon nanofibers carbonized in different atmospheres.