The photoelectrochemical (PEC) dual-electron pathway for water oxidation to produce hydrogen peroxide (H2O2) shows promising prospects. However, the dominance of the four-electron pathway leading to O2 evolution competes with this reaction, severely limiting the efficiency of H2O2 production. Here, we report a In2O3 passivator-coated BiVO4 (BVO) photoanode, which effectively enhances the selectivity and yield of H2O2 production via PEC water oxidation. Based on XPS spectra and DFT calculations, a heterojunction is formed between In2O3 and BVO, promoting the effective separation of interface and surface charges. More importantly, Mott-Schottky analysis and open-circuit potential measurements demonstrate that the In2O3 passivation layer on the BVO photoanode shifts the hole quasi-Fermi level towards the anodic direction, enhancing the oxidation level of holes. Additionally, the widening of the depletion layer and the flattening of the band bending on the In2O3-coated BVO photoanode favor the generation of H2O2 while suppressing the competitive O2 evolution reaction. In addition, the coating of In2O3 can also inhibit the decomposition of H2O2 and improve the stability of the photoanode. This work provides new perspectives on regulating PEC two/four-electron transfer for selective H2O2 production via water oxidation.