The most appealing technique for producing hydrogen fuel is electrochemical water splitting, which uses natural water cycle capabilities from renewable sources. The transition metal sulfide family includes nickel sulfide (NiS), which is promising for electrochemical water splitting as an exceptionally efficient, stable, and active electrocatalyst. Nickel sulfide (NiS), a series of cobalt-doped nickel sulfide (CoNi2S4) by varying weight percentages of Co (2, 4, 6, 8, wt %) and a series of sulfur-doped graphitic carbon nitride (SGCN) composite with 6 % CoNi2S4 by varying weight percentage of SGCN (10, 30, 50, 70, 90, wt %) were all synthesized using one-pot hydrothermal method. Structural morphologies and composition of the synthesized nanoparticles (NPs) and nanocomposites (NCs) were investigated using SEM, EDX, FTIR, and XRD characterization techniques. The electrochemical performance was examined via voltammetric, electrochemical impedance, and chronoamperometric studies. Outcomes suggest that composite 70 % SGCN@6 % CNS is the best electrocatalyst with the smaller Tafel slope (107 mVdec-1), lowest overpotentials (440 mV@10 mAcm−2), and minor charge transfer resistance (15 Ω) as electrode materials for electrochemical water splitting. The present research provides a workable approach for creating efficient bifunctional electrocatalysts for total water splitting, it can be inferred from the data.