The development of low-cost bifunctional electrocatalysts with both a high activity and long durability is critical for the oxygen reduction reaction (ORR) and oxygen evolution reaction (OER). The reasonable design and construction of bifunctional electrocatalysts is the key to energy storage and energy conversion technologies. In this study, transition metal carbon nitrides were used as a substitute for the precious metal catalyst, the Ni-Co-BTC (metal organic framework (MOF)) mixed with polyacrylonitrile (PAN) using electrostatic spinning technology to prepare the bamboo-like nanofibers precursor (Ni-Co-BTC@PAN). A series of electrocatalytic materials (NiCo-X@N-CNFs-Ts, T = 700, 800, 900 °C) were synthesized with nitrogen-doped carbon nanofibers coated with NiCo alloy nanoparticles using high temperature carbonization at different temperatures. We studied the effects of different calcination temperatures and different Ni/Co molar ratios of NiCo-X@N-CNFs-Ts (T = 700, 800, 900 °C) on the bifunctional catalytic performance of the ORR/OER. The composite, NiCo-0.8@N-CNFs-800, exhibited a highly doped-N level, uniform NiCo alloy nanoparticle dispersion and decentralized NiCo-Nx active sites, therefore affording an excellent bifunctional electrocatalytic performance. The ORR onset potential on NiCo-0.8@N-CNFs-800 was 0.91 V and the half-wave potential (E1/2) was 0.82 V, the NiCo-0.8@N-CNFs-800 corresponded to the minimum potential of 1.61 V at the current density of 10 mA cm-2 among all of the NiCo-X@N-CNFs-Ts hybrids under the OER condition. The NiCo-0.8@N-CNFs-800 catalyst exhibited a low reversible overpotential of 0.79 V between the ORR (E1/2) and OER (Ej = 10 mA cm-2) with excellent stability, durability and methanol tolerance, even surprisingly superior to the commercial Pt/C and RuO2 catalysts. This work provides a general strategy and useful guidance for the design and development of a variety of multifunctional non-noble metal catalysts for energy applications.