Restriction of nutrients in the adult diet extends lifespan across a diverse range of species, but less is known about the long-term effects of developmental dietary restriction. In particular, it is not known whether adult lifespan is influenced by developmental caloric restriction or macronutrient balance. We used the nutritional geometry approach to independently manipulate protein and carbohydrate contents of the larval diet in the neriid fly, Telostylinus angusticollis, and measured adult lifespan. We found that adult male and female lifespan was shortest when larvae were fed a protein restricted diet. Thus, protein restriction in the larval diet has the opposite effect of protein restriction in the adult diet (which prolongs life in this species and across a wide range of taxa). Adult lifespan was unaffected by larval dietary carbohydrate. These patterns persisted after controlling for larval diet effects on adult body size. We propose that larval and adult protein sources are used for distinct metabolic tasks: during development, dietary protein is used to build a durable soma that enhances adult lifespan, although excessive protein consumption partially reverses this effect.