Phototheranostics is a potential area for precision medicine, which has received increasing attention for antibacterial applications. Integrating all phototheranostic modalities in a single molecule and achieving precise spatial colocalization is a challenging task because of the complexity of energy dissipation and molecular design. Here, a type of quaternary amine functionalized aggregation-induced emission (AIE), AIEgen, was synthesized and used to produce singlet oxygen (1O2) and heat, which were used to eradicate the bacteria. With the introduction of the positive charge in AIEgen, AIE nanoparticles (AIE NPs) could selectively target bacteria. Notably, the AIE NPs displayed obvious antibacterial performance against Gram-positive bacteria (Staphylococcus aureus) and Gram-negative bacteria (Escherichia coli). The antibacterial rates of AIE NPs were as high as 99.9% and 99.8% for S. aureus and E. coli, respectively. Therefore, our results suggested the potential of AIE NPs acting as broad-spectrum antimicrobial materials, which provided a strategy for treating different microorganisms.