BACKGROUND Water dosed with hydrazine was used for the generation of H2 via a photocatalytic process using CdS nanofibers as photocatalysts under blue light irradiation sources. The optimal dose for the highest H2 production rate was obtained. Ethanol and sulfite/sulfide ions were also tested as hole scavengers. RESULTS CdS is semiconductor capable of absorbing blue light and used as a photocatalyst in H2 production. The H2 evolution with low doses of hydrazine was higher in comparison with the others sacrificial electron donors (SEDs). The mechanism of H2 evolution involves the participation of hydrazine and the positive holes photogenerated on CdS photocatalysts. CONCLUSION H2 is generated from the water–hydrazine solution in an O2-free system. Hydrazine in aqueous solution is photodecomposed by the holes, whereas H+ is reduced to produce H2 by the reaction with the conduction band electrons. Hydrazine as a sacrificial electron donor is better than the other reagents. © 2016 Society of Chemical Industry