Infected wounds pose a major mortality risk in animals and are common in predatory ants. Here, the authors show that M. analis ants apply antimicrobial compounds produced in the metapleural glands to treat infected wounds and reduce nestmate mortality.