• CdWO 4 -TiO 2 heterojunction was synthesized by one-step hydrothermal coating method. • CdS QDs was used to sensitize heterojunction and enhance photoelectric response. • The sensor realized sensitive detection of β-lg, and the LOD was 0.88 pg·mL −1 . As one of the common food allergens, milk proteins can cause severe allergic reactions. Among them, β-lactoglobulin can cause about 60% of IgE-mediated milk allergies. Thus, in this research, a new type of label-free photoelectrochemical immunosensor on the basis of CdS quantum dots (QDs) sensitized CdWO 4 -TiO 2 heterojunction was developed for the sensitive detection of β-lactoglobulin. CdWO 4 was synthesized by one-step hydrothermal method, and CdWO 4 -TiO 2 was prepared by one-step hydrothermal coating method. The existence of CdS QDs greatly promoted the separation of photoelectrons and holes, and improved the response of CdWO 4 -TiO 2 to visible light. Under the best experimental conditions, the constructed sensor exhibits excellent performance. In the range of 0.005 ng·mL −1 to 10 ng·mL −1 , the photocurrent intensity and the logarithm of β-lactoglobulin concentration show an excellent linear relationship, and the limit of detection is 0.88 pg·mL −1 . At the same time, the constructed sensor has good stability and reproducibility. It provides a new idea for the sensitive and fast detection of β-lactoglobulin and the analysis of other biological samples.