. A sandwich-type photoelectrochemical (PEC) immunosensor based on a ZnO/poly(5-formylindole) (P5FIn)/anthocyanin heterostructure was developed to achieve sensitive background-free detection ofthe tumor marker CYFRA21-1. ZnO with good photovoltaic properties is combined with narrow bandgap P5FIn to form a p-n type heterojunction. This structure reduces the electron-hole pair recombination, thereby enhancing the photocurrent response of the composite. Anthocyanidins are environmentally friendly natural compounds with excellent antioxidant, redox properties, and remarkable electrochemical activity. After sensitization by anthocyanins, the absorption and utilization of visible light in the composites are enhanced, further improving the PEC luminescence efficiency of the materials. Additionally, boron nitride quantum dots (BN QDs) are combined with Ab2 via polydopamine (PDA) as a secondary antibody marker, enhancing its sensitivity. The biosensor exhibited a linear detection range of 0.001-100ngmL-1 with a limit of detection (LOD) of 0.00033ngmL-1. Furthermore, this biosensor demonstrates excellent selectivity, reproducibility, and stability, as well as successful results in analyzingactual human serum samples. This approach provides a feasible method for tumor marker detection.