Klebsiella pneumoniae causes severe human diseases, but its resistance to current antibiotics is increasing. Therefore, new antibiotics to eradicate K. pneumoniae are urgently needed. Bacterial toxin–antitoxin (TA) systems are strongly correlated with physiological processes in pathogenic bacteria, such as growth arrest, survival, and apoptosis. By using structural information, we could design the peptides and small-molecule compounds that can disrupt the binding between K. pneumoniae MazE and MazF, which release free MazF toxin. Because the MazEF system is closely implicated in programmed cell death, artificial activation of MazF can promote cell death of K. pneumoniae. The effectiveness of a discovered small-molecule compound in bacterial cell killing was confirmed through flow cytometry analysis. Our findings can contribute to understanding the bacterial MazEF TA system and developing antimicrobial agents for treating drug-resistant K. pneumoniae.