Two-dimensional (2D) layered nanomaterials showed great promise in the photocatalysis due to their unique physical properties. Defect engineering enables significant optimization of the electronic structure of 2D nanomaterials to further enhance their photocatalytic activity. Herein, we designed two oxygen-rich vacancies BiOBr (BBR) and oxygen-poor vacancies BiOBr (BBP) to investigate their photocatalytic activities. The results demonstrated that BBR exhibited much higher activity than BBP in killing Gram-negative (Escherichia coli, E. coli) and Gram-positive bacteria (Bacillus subtilis, B. subtilis) under 808 nm laser irradiation. The enhanced antibacterial activity can be attributed to optimized electronic structure of BBR, which leads to more intimate interactions with bacteria, stronger absorption capacity to near-infrared (NIR) light, and longer photocarriers lifetime. Moreover, density functional theory (DFT) calculations demonstrated that BBR has a better adsorption of O2, which facilitates the generation of more reactive oxygen species (ROS) for superior activity. This work not only provides a facile approach for constructing oxygen-rich vacancies in BiOBr, but also but also offers new insights to the potential of 2D materials optimized by defect engineering for efficient NIR light-driven antibacterial activity.