A method for producing CdS-based photocatalyst for hydrogen generation and a method for producing hydrogen in the presence of CdS. Dissolve the compound containing Cd and M in water, after the M value reaches 0.001-20.00, add H to it 2 S or Na 2 S any reactant, stir to get Cd[M]S precipitate, wash the precipitate with water, and vacuum dry the washed precipitate in a nitrogen (flow) atmosphere at a temperature of 105-150 ℃ for 1.5-3.0 Hours later, add a liquid phase m-containing compound to the dried Cd[M]S precipitate for doping treatment, so that the m content in the entire photocatalyst reaches 0.10 to 5.00% by weight, and the photocatalyst with the following formula I is produced. m(a)/Cd[M(b)]S(I) (in the above general formula, m represents the metal doped as an electron acceptor, which is made from Ni, Pd, Pt, Fe, Ru, Co or their oxides One or more substances selected from; a represents the weight % of m, and its value is 0.10 to 5.00. M is a promoter selected from V, Cr, Al, P, As, Sb, Pb, and b represents M/ (Mole % of (M+Cd), its value is 0.001~20.00.) Make the above-mentioned photocatalyst, contact with the water that adds 0.05~1.0 mole sodium sulfite reducing agent and 0.05~1.0 mole sodium sulfide electron donor to suspend it, while stirring While irradiating the light in the visible light region adjusted by the filter and sunlight, it reacts to generate hydrogen.