Iron sequestration provides an innate defense, termed nutritional immunity, leading pathogens to scavenge iron from hosts. Although the molecular basis of this battle for iron is established, its potential as a force for evolution at host-pathogen interfaces is unknown. We show that the iron transport protein transferrin is engaged in ancient and ongoing evolutionary conflicts with TbpA, a transferrin surface receptor from bacteria. Single substitutions in transferrin at rapidly evolving sites reverse TbpA binding, providing a mechanism to counteract bacterial iron piracy among great apes. Furthermore, the C2 transferrin polymorphism in humans evades TbpA variants from Haemophilus influenzae, revealing a functional basis for standing genetic variation. These findings identify a central role for nutritional immunity in the persistent evolutionary conflicts between primates and bacterial pathogens.