Because of the rapid emergence of antibiotic-resistant bacteria, there is a growing need to discover antibacterial agents. Here, we design and synthesize a compound of TPA2PyBu that kills both Gram-negative and Gram-positive bacteria with an undetectably low drug resistance. Comprehensive analyses reveal that the antimicrobial activity of TPA2PyBu proceeds via a unique dual mechanism by damaging bacterial membrane integrity and inducing DNA aggregation. TPA2PyBu could provide imaging specificity that differentiates bacterial infection from inflammation and cancer. High in vivo treatment efficacy of TPA2PyBu was achieved in methicillin-resistant Staphylococcus aureus infection mouse models. This promising antimicrobial agent suggests that combining multiple mechanisms of action into a single molecule can be an effective approach to address challenging bacterial infections.