In this work, BiVO4 films are firstly synthesized, followed by electrodepositing of Cu2O to construct BiVO4/Cu2O heterojunction electrodes for photoelectrochemical water splitting. By regulating the electrodeposition potential, it is possible to control that Cu2O is deposited on the surface or inside of BiVO4, which enables them n-type or p-type semiconductivity behavior for oxygen and hydrogen evolution reactions, respectively. Due to the built-in electric field of p-n heterojunction and the Co-Pi co-catalyst layer, the anodic photocurrent density of optimized BiVO4/Cu2O/Co-Pi photoanode reaches 1.97 mA cm−2 at 1.23 V vs. RHE. In the meantime, the deposition of Cu2O inside BiVO4 has reversed the arrangement of the BiVO4/Cu2O heterogeneous structure. The cathodic photocurrent density of the fabricated BiVO4/Cu2O-C photocathode shows − 2.9 mA cm−2. Furthermore, the unbiased solar tandem cell is fabricated using BiVO4/Cu2O-C photocathode and BiVO4/Cu2O/Co-Pi photoanode, which exhibits 0.1 mA cm−2 in the photoelectrochemical cell without applying any external voltage.