In recent years, there has been significant interest in transition-metal sulfides (TMSs) due to their economic affordability and excellent catalytic activity. Nevertheless, it is difficult for TMSs to achieve satisfactory performance due to problems such as low conductivity, limited catalytic activity, and inadequate stability. Therefore, a catalyst with a heterostructure constituted of a nickel–iron-layered double hydroxide, nickel sulfide, molybdenum disulfide, and cerium dioxide was designed. At the current density of 10 mA cm−2 in an alkaline solution, the catalyst exhibits a HER overpotential of 116 mV. In addition, an overpotential of 235 mV@150 mA cm−2 was displayed for OER. The catalyst showed a good retention rate (94.7% for HER, 98.6% for OER) after 160 h stability tests. The excellent electrochemical performance is attributed to the following points: 1. The self-supporting three-dimensional hierarchical structure provides abundant sites, fast ion diffusion channels, and electron transfer paths, and ensures structural stability. 2. The strong interfacial electron interaction between Ni3S2/MoS2 heterojunction and NiFe-LDH improves the OER reaction kinetics. 3. The Ce3+ and oxygen vacancies in CeO2 promote the dissociation of H2O and promote the HER reaction kinetics. This approach paves the way for developing highly efficient electrocatalysts for various electrochemical applications.