Nitrogen-doped carbon matrix (Co/NC) has been synthesized with NaCl as a template and peptone as a carbon/nitrogen source. Subsequently, mesoporous nitrogen-doped CoSe/NC was prepared by solvothermal selenization. The obtained CoSe/NC is useful as highly efficient bifunctional electrocatalyst for hydrogen evolution and oxygen reduction reactions. Structures of the CoSe/NC material have been characterized by X-ray diffraction, scanning electron microscopy, transmission electron microscopy, N2 adsorption desorption analysis and X-ray photoelectron spectroscopy. Results demonstrate the role of NaCl as efficient low cost template to form mesoporous nitrogen doped carbon, which could significantly simplify and reduce the cost of the synthetic procedure. During hydrogen evolution reaction in a 1 M KOH electrolyte, the best performing sample with formula Co0.88Se/NC produces an overpotential of 72 ± 0.1 mV at a current density of 10 mA cm−2. This material also shows excellent electrocatalytic activity and stability in oxygen reduction reaction, superior even to a commercial Pt/C catalyst. A primary zinc-air battery containing Co0.88Se/NC as a oxygen reduction reaction catalyst reaches an open circuit voltage of 1.44 ± 0.02 V, higher than that of a Pt/C containing zinc-air battery and delivers superior power and current density combination.