In this work, the PVP‐assisted CdS/PbI2 heterojunction UV‐Visible Photodetector was constructed by the sol‐gel spin coating method. The X‐ray diffraction (XRD), scanning electron microscopy (SEM) and energy dispersive spectrometer (EDS) demonstrated the synthesis and successful complexation of PVP, CdS, and PbI2. The UV‐Visible absorption spectroscopy and UV photoelectron spectroscopy (UPS) measurements of CdS and PbI2 were carried out to prove that the CdS and PbI2 form a type II heterojunction. Compared with pure CdS film photodetector, the CdS (PVP)/PbI2 heterojunction photodetector has self‐powered characteristics, and exhibits excellent photoconductivity in the UV‐Visible with higher switching ratios, detection rates, and faster response times of 1.1 × 105, 9.77 × 1011 Jones and 20 ms, respectively, which has great potential in the field of UV‐Visible self‐powered photodetector.This article is protected by copyright. All rights reserved.