The exploration of an efficient photocatalyst for H2 evolution directly from water splitting is highly desirable due to the current environmental and energy situation. The present work successfully used a solvothermal method to synthesize organic-inorganic CdS-diethylenetriamine (CdS-D) nanorods (NRs). The amine-modified CdS-D@ZIF-8 nanocomposite materials were prepared using the self-assembly method with different ZIF-8 nanocrystals (NCs) weight ratios. At λ ≥ 420 nm wavelength, the optimized CdS-D@ZIF-8 (CZ-2) nanocomposite with 5.0 wt% loading of ZIF-8 NCs showed the highest performance of 2293.9 μmol g−1 h−1 H2 evolution and an apparent quantum yield (AQY) of 4.95%. The CZ-2 nanocomposite's activity was 114.69, 5.25, and 1.32 times higher than that of ZIF-8 NCs (20.0 μmol g−1 h−1), CdS-D NRs (436.4 μmol g−1 h−1) and 1.0 wt% Pt/CdS-D (1737.3 μmol g−1 h−1), respectively. The cyclic photostability of the prepared CZ-2 nanocomposite remained unchanged after six consecutive cycles. The UV-DRS, electrochemical measurements, and Mott-Schottky (MS) analysis were performed to explain the band edge positions for CdS-D NRs and ZIF-8 NCs. The detailed S-scheme charge transfer mechanism of the as-prepared catalysts was also studied using the density functional theory (DFT). This work provides vital information for the controllable synthesis of ZIF-8-modified S-scheme nanocomposites for solar energy utilization.