Staphylococcus aureus produces hospital- and community-acquired infections, with methicillin-resistant S. aureus posing a serious public health threat. The golden carotenoid pigment of S. aureus, staphyloxanthin, promotes resistance to reactive oxygen species and host neutrophil-based killing, and early enzymatic steps in staphyloxanthin production resemble those for cholesterol biosynthesis. We determined the crystal structures of S. aureus dehydrosqualene synthase (CrtM) at 1.58 angstrom resolution, finding structural similarity to human squalene synthase (SQS). We screened nine SQS inhibitors and determined the structures of three, bound to CrtM. One, previously tested for cholesterol-lowering activity in humans, blocked staphyloxanthin biosynthesis in vitro (median inhibitory concentration ~100 nM), resulting in colorless bacteria with increased susceptibility to killing by human blood and to innate immune clearance in a mouse infection model. This finding represents proof of principle for a virulence factor-based therapy against S. aureus.