The rapid acquisition of antibiotic resistance poses difficulties in the development of effective methods to eliminate pathogenic bacteria. New bactericides, especially those do not induce the emergence of resistance, are thus in great demand. In this work, we report an aggregation-induced emission fluorogen, TPE-Bac, for bacterial imaging and elimination. TPE-Bac can be readily dissolved in aqueous solution with weak emission. The presence of bacteria can turn on its emission, and thus no washing step is required in the imaging process. Meanwhile, TPE-Bac can be applied as a bactericide for elimination of bacteria. The amphiphilic TPE-Bac bearing two long alkyl chains and two positively charged amines can intercalate into the membrane of bacteria, increase membrane permeability and lead to dark toxicity. The efficiency of bacteria killing is greatly enhanced under light irradiation. TPE-Bac can serve as a photosensitizer to induce reactive oxygen species (ROS) generation, which ensures the efficient killing of bacteria. The TPE-Bac-containing agar plates can be continuously used for bacteria killing by applying light to induce ROS generation.