The construction of efficient and stable non-noble metal bifunctional electrocatalysts for the hydrogen evolution reaction (HER) and the oxygen evolution reaction (OER) presents a challenge in electrocatalytic water splitting. CoS2 is a promising electrocatalyst that could replace precious metals. In this work, a series of Co-MOF precursors having average particle sizes ranging from the nanometer to the micron scale (86–1084 nm) were synthesized in an unprecedented attempt; Co/CoS2 heterojunction embedded in nitrogen doped carbon framework (Co/CoS2@NC) was prepared through further carbonization and sulfurization. The samples were characterized and evaluated by X-ray powder diffractometer (XRD), scanning electron microscopy (SEM), transmission electron microscopy (TEM), X-ray photoelectron spectroscopy (XPS), and electrochemical techniques. The results indicate that when the size of Co-MOF is less than 300 nm, the cubic structure framework easily collapses to form the spherical structure during the carbonization process. The catalytic activity of [email protected] is size-dependent; Co/CoS2@NC exhibited the best performance among the series, with an overpotential of 188 mV for HER and 349 mV for OER at a current density of 10 mA cm−2. This work provides experimental guidance for the design and synthesis of low-cost, efficient, and robust Co-based electrocatalysts.