Variation in gene expression leads to phenotypic diversity and plays a central role in caste differentiation of eusocial insect species. In social Hymenoptera, females with the same genetic background can develop into queens or workers, which are characterized by divergent morphologies, behaviours and lifespan. Moreover, many social insects exhibit behaviourally distinct worker castes, such as brood-tenders and foragers. Researchers have just started to explore which genes are differentially expressed to achieve this remarkable phenotypic plasticity. Although the queen is normally the only reproductive individual in the nest, following her removal, young brood-tending workers often develop ovaries and start to reproduce. Here, we make use of this ability in the ant Temnothorax longispinosus and compare gene expression patterns in the queens and three worker castes along a reproductive gradient. We found the largest expression differences between the queen and the worker castes (~2500 genes) and the smallest differences between infertile brood-tenders and foragers (~300 genes). The expression profile of fertile workers is more worker-like, but to a certain extent intermediate between the queen and the infertile worker castes. In contrast to the queen, a high number of differentially expressed genes in the worker castes are of unknown function, pointing to the derived status of hymenopteran workers within insects.