Z-scheme Bi2MoO6/Bi5O7I heterojunction was constructed by an in situ solvothermal method, which was composed of Bi2MoO6 nanosheets growing on the surface of Bi5O7I microrods. The antibacterial activities under illumination towards Escherichia coli (E. coli) were investigated. The Bi2MoO6/Bi5O7I composites exhibited more outstanding antibacterial performance than pure Bi2MoO6 and Bi5O7I, and the E. coli (108 cfu/mL) was completely inactivated by BM/BI-3 under 90 min irradiation. Additionally, the experiment of adding scavengers revealed that h+, •O2− and •OH played an important role in the E. coli inactivation process. The E. coli cell membrane was damaged by the oxidation of h+, •O2− and •OH, and the intracellular components (K+, DNA) subsequently released, which ultimately triggered the apoptosis of the E. coli cell. The enhanced antibacterial performance of Bi2MoO6/Bi5O7I heterojunction is due to the formation of Z-scheme heterojunction with the effective charge transfer via the well-contacted interface of Bi2MoO6 and Bi5O7I. This study provides useful guidance on how to construct Bi5O7I-based heterojunction for water disinfection with abundant solar energy.