Nowadays, water splitting has been recognized as one of the most attractive ways to produce clean hydrogen energy. Herein, a novel sulfur-doped layered double-hydroxide (namely, S-NiCo-LDH) electrocatalyst with nanocage structure is prepared. After the etching treatment with Ni ions, the spatial structure of the catalysts is opened, and the hydrophilicity is improved, which will enhance the adsorption capacity for H2O to provide convenience for hydrogen evolution reaction (HER). Interestingly, the S doping can boost the capture capability toward OH- to create conditions for the occurrence of oxygen evolution reaction (OER). More importantly, the introduction of S element can improve the density of states located near the Fermi level of NiCo-LDH, thereby accelerating the electron transfer and increase the carrier density. Meanwhile, the existence of S element can remarkably reduce the energy barriers of *O and *H formation, boosting HER and OER in an alkaline solution. As a result, the S-NiCo-LDH electrocatalyst shows excellent performance in overall water splitting, affording low overpotentials of 168 and 235 mV at 10 mA/cm2 for HER and OER, respectively. Furthermore, the S-NiCo-LDH electrocatalyst exhibits good long-term stability in both HER and the OER. In short, the current work can give a meaningful reference for future research.