The selective forces that shape and maintain eusocial societies are an enduring puzzle in evolutionary biology. Ordinarily sterile workers can usually reproduce given the right conditions, so the factors regulating reproductive division of labour may provide insight into why eusociality has persisted over evolutionary time. Queen-produced pheromones that affect worker reproduction have been implicated in diverse taxa, including ants, termites, wasps and possibly mole rats, but to date have only been definitively identified in the honeybee. Using the black garden ant Lasius niger, we isolate the first sterility-regulating ant queen pheromone. The pheromone is a cuticular hydrocarbon that comprises the majority of the chemical profile of queens and their eggs, and also affects worker behaviour, by reducing aggression towards objects bearing the pheromone. We further show that the pheromone elicits a strong response in worker antennae and that its production by queens is selectively reduced following an immune challenge. These results suggest that the pheromone has a central role in colony organization and support the hypothesis that worker sterility represents altruistic self-restraint in response to an honest quality signal.