Numerous studies have identified cuticular compounds that distinguish adult queens from workers in social insect colonies, but how future queens are identified at the larval stage is poorly understood. Nevertheless, the ability of workers to discriminate queen and worker larvae is necessary for them to regulate caste determination and queen production. In the ant Harpegnathos saltator, workers bite larvae to inhibit queen development, and we used biting as an assay to test how workers identify queens at the larval stage. The transfer of cuticular compounds from queen to worker larvae through direct physical contact (rubbing) or using a hexane extract both elicited biting. Gas chromatography revealed significant differences in cuticular hydrocarbon profiles of queen and worker larvae that could be induced by treatment with a juvenile hormone (JH) analogue. Finally, treatment of male larvae with a JH analogue also elicited worker biting, which suggests a direct connection between JH levels and the production of a larval queen signal. These results demonstrate that workers identify larval caste using a chemical signal present on the cuticle, a ‘princess pheromone’, that reflects endocrine changes associated with queen development. Based on the connection between JH levels and the production of a larval queen signal, we developed a model for caste determination in H. saltator that incorporates endocrine, pheromonal and behavioural control of caste development.