Developing environmentally friendly, broad-spectrum, and long-lasting antibacterial materials remains challenging. Our ternary BiOI@Bi2S3/MXene composites, which exhibit both photothermal therapy (PTT) and photodynamic therapy (PDT) antibacterial properties, were synthesized through in-situ vulcanization of hollow flower-shaped BiOI on the surface of two-dimensional Ti3C2 MXene. The unique hollow flower-shaped BiOI structure with a high exposure of the (001) crystal plane amplifies light reflection and scattering, offering more active sites to improve light utilization. Under 808nm irradiation, these composites achieved a photothermal conversion efficiency of 57.8%, boosting the PTT antibacterial effect. The heterojunction between Bi2S3 and BiOI creates a built-in electric field at the interface, promoting hole and electron transfer. Significantly, the close-contact heterogeneous interface enhances charge transfer and suppresses electron-hole recombination, thereby boosting PDT bacteriostatic performance. EPR experiments confirmed that ∙O2- and •OH radicals play major roles in photocatalytic bacteriostatic reactions. The combined antibacterial action of PTT and PDT led to efficiencies of 99.7% and 99.8% against P. aeruginosa and S. aureus, respectively, under 808nm laser irradiation. This innovative strategy and thoughtful design open new avenues for heterojunction materials in PTT and PDT sterilization. STATEMENT OF SIGNIFICANCE: Photodynamic and photothermal therapy is a promising antibacterial treatment, but its efficiency still limits its application. To overcome this limitation, we prepared three-dimensional heterogeneous BiOI@Bi2S3/MXene nanocomposites through in-situ vulcanization of hollow flower-shaped BiOI with a high exposure of the (001) crystal plane onto the surface of two-dimensional MXene material. The resulting ternary material forms a close-contact heterogeneous interface, which improves charge transfer channels, reduces electron-hole pair recombination, and amplifies photodynamic bacteriostatic performance. These nanocomposites exhibit photothermal conversion efficiency of 57.8%, enhancing their photothermal bactericidal effects. They demonstrated antibacterial efficiencies of 99.7% against P. aeruginosa and 99.8% against S. aureus. Therefore, this study provides a promising method for the synthesis of environmentally friendly and efficient antibacterial materials.