We developed an efficient photoelectrochemical system with high photoconversion ability and long-term stability based on a type-II heterojunction between (S and N) co-doped TiO2 (SNT) and CdxZn1−xIn2S4 (CZIS) via a two-step hydrothermal process. The optimization of the Cd-to-Zn ratio improved the water oxidation rate and thermal treatment was conducted to introduce sulfur vacancies into the CZIS crystal structure. Theoretical investigations confirmed the improved water oxidation tendency of CZIS owing to the deterioration of the water oxidation kinetics. The effect of doping, presence of sulfur vacancies, and coupling with SNT resulted in superior charge separation and hole-injection tendencies. The optimized SNT/CdxZn1−xIn2S4 (Vs) sample exhibited a high photocurrent density of 3.1 mA cm−2 at 1.23 V vs. RHE, which was 2.4 times that of SNT. The photoconversion efficiency of the prepared heterostructure was further augmented by the deposition of a co-catalyst, resulting in a maximum photoconversion efficiency of 1.5 %, H2 gas evolution rate of 60 μmol/h, and 99 % faradic rate efficiency after 5 h of photoelectrochemical water-splitting reaction. The detailed band alignment between the two semiconductors was investigated using different techniques to determine the charge-transfer mechanism and verify the role of each component.