In this study, we report on the synthesis and photoelectrochemical (PEC) performance of CdS/ZnO nanocomposite (NC) photoanodes annealed at varying temperatures (300, 350, 400, 450 °C). ZnO nanosheets (NSs) were initially deposited using a nanoparticle deposition system, followed by the spin coating deposition of CdS nanoparticles (NPs) and subsequent annealing. The fabricated NCs are environmentally friendly, binder-free, cost-effective, and scalable. Scanning Electron Microscopy of ZnO, CdS, and CdS/ZnO NCs annealed at 400 °C reveals that ZnO NSs are well-coated with CdS NPs, establishing strong interfacial bonding between the two materials. Structural analysis confirms the hexagonal wurtzite structure of ZnO, while the deposited CdS NPs remain amorphous. X-ray photoelectron spectroscopy shows the evolution of strong interfacial interactions between ZnO NSs and CdS NPs in the hybrid NCs. Optical studies reveal that the CdS-ZnO NCs exhibit stable band gaps (~ 3.21–3.23 eV), and the photoresponse current is significantly improved compared to pure ZnO and CdS photoanodes. The optimized CdS-ZnO NC photoanode (400 °C) shows the highest photocurrent of 2.44 mA cm–2 at − 0.14 V vs Hg/HgO and the highest current conversion efficiency of 1.58% at − 0.4 V vs Hg/HgO, demonstrating efficient solar water splitting performance. Comprehensive PEC analyses (EIS, OCP, Mott–Schottky) confirm that performance enhancement stems from improved charge separation and faster interfacial charge transfer with increasing annealing temperature.