Stings of certain ant species (Hymenoptera: Formicidae) can cause intense, long-lasting nociception. Here we show that the major contributors to these symptoms are venom peptides that modulate the activity of voltage-gated sodium (NaV) channels, reducing their voltage threshold for activation and inhibiting channel inactivation. These peptide toxins are likely vertebrate-selective, consistent with a primarily defensive function. They emerged early in the Formicidae lineage and may have been a pivotal factor in the expansion of ants.