At present, the pollution of antibiotic wastewater is serious, which has a potential impact on the survival of organisms. In this study, SO42- functionalized small-sized flower-like CdS is successfully synthesized by utilizing H2S at various levels of relative humidity. The CdS catalyst is then employed for the degradation of tetracycline hydrochloride (TC) through photocatalytic processes. Experimental findings indicate that CdS-8 %RH exhibits the highest photocatalytic efficiency, degrading 98.6 % of TC within 80 min, which is 1.5 times more efficient than CdS alone. HPLC-MS analysis is used to identify degradation intermediates and pathways, and to evaluate the toxicity and mutagenicity of these intermediates. The photocatalytic mechanism is elucidated through species capture experiments, electrochemical tests, KPFM tests, and conduction valence band position analysis.