A photoelectrochemical sensor for target detection of hydrogen peroxide was designed based on a new heterojunction nanocomposite which was sulfhydryl-borate ester-modified A1/B1-type pillar[5]arene (BP5)-functionalized Au NPs and multi-walled carbon nanotubes hybridized with bismuth bromide oxide (Au@BP5/MWNTs-BiOBr). The specific sensor was based on the direct induction of oxidation by hydrogen peroxide of the borate ester group of pillar[5]arene. Additionally, the local surface plasmon resonance (LSPR) of Au NPs enhanced visible light capture, the host-guest complexation of BP5 with H2O2 enhanced photocurrent response, the layer-by-layer stacked nanoflower structure of BiOBr provided large specific surface area with more active sites, and the conductivity of MWNTs enhanced the charge separation efficiency and significantly improves the stability of PEC. Their synthesis effect significantly increased the photocurrent signal and further enhanced the detection result. Under the optimal conditions, the linear concentration range of H2O2 detected by the Au@BP5/MWNTs-BiOBr sensor was from 1 to 60pmol/L. The limit of detection (LOD) and the limit of quantification (LOQ) of the method were 0.333pmol/L and 1pmol/L, respectively, and the sensitivity was 6.471pmol/L. Importantly, the PEC sensor has good stability, reproducibility, and interference resistance and can be used for the detection of hydrogen peroxide in real cells.