Low-cost transition metal sulfides are commonly utilized as photocatalysts for H2 production owing to their exceptional conductivity and superior specific surface area. In this study, MoS2-NiS2 nanoflowers with multidimensional space structure was obtained through the sulphuration reaction between S2- and NiMoO4 under Kirkendall effect during hydrothermal reaction. Subsequently, MoS2-NiS2 was loaded on the surface of g-C3N4 nanosheets using a solvent self-assembly strategy to form 3D MoS2-NiS2/g-C3N4 heterojunctions. The experimental results demonstrate that the H2 production rate of 20 wt% MoS2-NiS2/g-C3N4 reaches 22153 μmol·g-1·h-1 under a 300 W Xe lamp irradiation, which is 59.5 and 201.4-folds than MoS2-NiS2 and g-C3N4, and surpasses 20 wt% MoS2/g-C3N4 (211 μmol·g-1·h-1) and 20 wt% NiS2/g-C3N4 (6183 μmol·g-1·h-1). The XPS and Superoxide radical capture experiments demonstrate that the charge transfer between MoS2-NiS2 and g-C3N4 follows the S-scheme route, and NiS2 functions as an electron mediator, facilitating the transfer of electrons from MoS2 to g-C3N4 to consume the holes, which enhances the efficiency of H2 evolution reaction on g-C3N4. Furthermore, the S-scheme heterojunction of MoS2-NiS2/g-C3N4 with the multidimensional geometric structure can provide abundant active sites for catalytic reactions, this presents a promising approach for the development of cost-effective and high-performance g-C3N4-based heterojunctions. This work offers distinctive perspectives on the trajectory of renewable H2 energy development.