A novel type of composite, consisting of a bi-metallic sulfide/carbon nanocomposite system, was developed as a multifunctional electrocatalyst. The nanocomposite system was facilely generated via a one-step simultaneous carbonization and sulfurization of a selected metal-organic framework. Sample Ni1Co4S@C-1000 is one of the most efficient electrocatalysts and exhibited superior activity and stability in oxygen evolution reaction (OER) due to the Ni substitution, the high porosity, the homogeneous dispersion of active components and the effect of N, S-codoping. This novel material showed a low onset potential of 1.43 V (vs reversible hydrogen electrode) and a stable current density of 10 mA cm−2 at 1.51 V in a 0.1 M KOH alkaline solution over a long-term operation, which is better than IrO2/C and other composites synthesized under the same conditions. The Ni1Co4S@C-1000 sample can also efficiently catalyse oxygen reduction reaction (ORR), with a four-electron pathway for reversible oxygen evolution and reduction. Furthermore, Ni1Co4S@C-800 showed enhanced electrocatalytic activity for hydrogen evolution reaction (HER) in water splitting. These findings pave a way to develop effective and promising alternative electrocatalysts towards OER, ORR and HER in the next generation of energy storage and conversion technologies.