ABSTRACT The standard evolutionary theory of ageing predicts a negative relationship (trade-off) between fecundity and longevity. However, this relationship can become positive: (i) under the influence of longevity-enhancing mutations; (ii) when individuals have unequal resources; and (iii) in eusocial insects, in which reproductive queens outlive less- or non-reproductive workers. Developmental diet is likely to be central to determining trade-offs as it affects key fitness traits such as adult body size, but its exact role remains uncertain. For example, in Drosophila melanogaster fruit flies, changes in adult diet can affect fecundity, longevity, and gene expression throughout life, but it is unknown how changes in developmental (larval) diet affect fecundity-longevity relationships or gene expression in adults. Using D. melanogaster , we therefore tested the hypothesis that variation in developmental diet alters the directionality of fecundity-longevity relationships in adults, and characterised associated gene expression changes. We reared D. melanogaster larvae on low (20%), medium (100%), and high (120%) SYA (Sugar Yeast Agar) diets, and transferred adult females developing from these larvae to a common (110% SYA) adult diet. We measured life-time fertility (realised fecundity) and longevity of individual adult females and, using mRNA-seq, profiled gene expression changes across two time-points. Adult females raised on the different larval diets exhibited fecundity-longevity relationships that were significantly different in directionality, i.e., varied from positive to negative, despite minimal differences in mean life-time fertility or longevity. Treatments also differed in age-related gene expression, including expression of genes known to be associated with ageing. Hence, this study shows that the sign of fecundity-longevity relationships in adult insects can be altered and even reversed by variation in larval diet quality. Furthermore, larval diet quality may be a key mechanistic factor underpinning positive fecundity-longevity relationships observed in species such as eusocial insects.