The major challenge in water splitting is to develop low cost electrocatalysts as alternatives for simultaneously generating oxygen and hydrogen. Herein, we report the successful synthesis of cobalt nanoparticle embedded porous nitrogen doped carbon nanofibers (Co-PNCNFs) by a facile and scalable electrospinning technology. The electrospun Co-PNCNF composite exhibits a low onset potential of 1.45 V (vs. RHE) along with high current density (overpotential of 285 mV for 10 mA cm-2) towards the oxygen evolution reaction (OER). The exceptional performance could be ascribed to the bi-functionalized CNFs with nitrogen doping and cobalt encapsulation. Moreover, the porous structure and synergistic effect further provide a highly effective surface area and facilitate a fast electron transfer pathway for the OER process. Interestingly, the Co-PNCNF composite also displays the capability for the hydrogen evolution reaction (HER) in alkaline solution. A water electrolyzer cell fabricated by applying Co-PNCNFs as both anode and cathode electrocatalysts in alkaline solution can achieve a high current density of 10 mA cm-2 at a voltage of 1.66 V.