Semiconductive photocatalytic materials have received increasing attention recently due to their ability to transform solar energy into chemical fuels and photodegrade a wide range of pollutants. Among them, cadmium sulfide (CdS) nanoparticles have been extensively studied as semiconductive photocatalysts in previous studies on hydrogen generation and environmental purification due to their suitable bandgap and sensitive light response. However, the practical applications of CdS are limited by its low charge separation, which is caused by its weak ability to separate photo-generated electron-hole pairs. In order to enhance the photoelectrochemical activity of CdS, a polymer based on viologen (PHV) was utilized to create a series of PHV/CdS hybrid films so that the viologen unit could work as the electron acceptor to increase the charge separation. In this work, various electrochemical, spectroscopic, and microscopic methods were utilized to analyze the hybrid films, and the results indicated that introducing PHV can significantly improve the performance of CdS. The photoelectrochemical activities of the hybrid films were also evaluated at various ratios, and it was discovered that a PHV-to-CdS ratio of 2:1 was the ideal ratio for the hybrid films. In comparison with CdS nanoparticles, the PHV/CdS hybrid film has a relatively lower band gap, and it can inhibit the recombination of electrons and holes, enhancing its photoelectrochemical activities. All of these merits make the PHV/CdS hybrid film as a strong candidate for photocatalysis applications in the future.