Hospital-acquired pneumonia caused by Staphylococcus aureus is associated with patient morbidity and mortality, despite adequate antibiotic therapy. This illustrates the need for treatments beyond antibiotics. The pore-forming heptameric toxin α-hemolysin (Hla) is a major pathogenicity factor of S. aureus and a clinically validated target. We identify quinoxalinediones (QDS) as highly potent Hla inhibitors, conferring protection against the hallmarks of Hla-induced pathogenicity such as Ca2+ influx, cytotoxicity, hemolysis, and monolayer destruction. The effects were exerted across major Hla subtypes in all relevant cell types. QDS prevented the formation of functional pores by interacting with Hla near the phospholipid-binding site. The QDS analog, H052, was active in mouse models of S. aureus lung infections, when administered prophylactically or therapeutically, either as monotherapy or when given in combination with the antibiotic linezolid. The study provides evidence that complex bacterial toxins can be targeted in vivo by drug-like small molecules.