This study presents the green synthesis and characterization of NiFe2O4@CdS core-shell nanocatalysts for enhanced photocatalytic sustainable hydrogen production. An eco-friendly approach was adopted to fabricate cadmium sulfide (CdS) nanoparticles using watermelon rind (WR), banana peel (BP) extracts, and nickel ferrite (NiFe2O4) nanoparticles using star anise (SA) extract. The synthesized nanoparticles were characterized through scanning electron microscopy (SEM), Energy dispersive X-ray analysis (EDX), transmission electron microscopy (TEM), dynamic light scattering (DLS), zeta potential measurements, X-ray diffraction (XRD), and UV–Vis spectroscopy to investigate their structural, morphological, and optical properties. The integration of CdS with NiFe2O4 aimed to overcome limitations such as charge carrier recombination and photo corrosion, commonly encountered in conventional CdS-based photocatalysts. The core-shell structure demonstrated superior photocatalytic performance for hydrogen evolution. Photocatalytic hydrogen production analysis showed that NiFe2O4(300 °C)@BP-CdS achieved the most remarkable hydrogen evolution average rate of 1220.6 μmol g−1 h−1 after 5 h of irradiation, surpassing both the as-prepared and 600 °C calcined samples. The enhanced activity is ascribed to improved charge separation and elevated light absorption from the refined calcination procedure. Photoelectrochemical assessments, including chronoamperometry (CA) and electrochemical impedance spectroscopy (EIS), also validated the enhanced photocurrent response and reduced charge transfer resistance of the NiFe2O4/CdS nanocomposite compared to its bare CdS. These findings underscore the potential of green-synthesized NiFe2O4@CdS nanocatalysts in advancing sustainable hydrogen production technologies. The findings contribute to both environmental preservation and economic sustainability.