Abstract In this study, we design a hybrid BiFeO 3 /SrTiO 3 p–n heterojunction to enhance the photoelectrochemical (PEC) performance of the sample. The experimental results reveal that the heterojunction can significantly improve the PEC performance. The optimized BiFeO 3 /SrTiO 3 heterojunction sample shows a photocurrent density of −20.8 μ A·cm −2 , which is 2.9 times higher than that of the pristine BiFeO 3 (−7.2 μ A·cm −2 ). The improvement in PEC performance is attributed to the p–n heterojunction formed between BiFeO 3 and SrTiO 3 , leading to the efficient separation and transport of carriers. Our work provides a promising route to develop the high-performance PEC system.