Photosensitizers (PSs) with aggregation-induced emission (AIE) properties have gained popularity for treating bacterial infections. However, most AIE PSs have a poor water solubility and low selectivity, limiting their applications in biological systems. Herein, we report a water-soluble and bacteria-targeting AIE PS that exhibits minimum cytotoxicity toward human cells with and without light irradiation. Acting as a narrow-spectrum antibacterial agent without light irradiation, TPA-1 eradicates planktonic Staphylococcus aureus and inhibits biofilm formation by targeting the S. aureus membrane, inhibiting the supercoiling activity of S. aureus DNA gyrase, and causing the downregulation of multiple essential proteins. Upon light irradiation, TPA-1 generates reactive oxygen species (ROS) that cause membrane damage, resulting in excellent antiplanktonic and antibiofilm activities against S. aureus and Pseudomonas aeruginosa, significantly reducing the number of viable bacteria in biofilms and promoting wound healing in vivo.