The mitochondrial unfolded protein response (UPRmt) has been associated with long lifespan across metazoans. In Caenorhabditis elegans, mild developmental mitochondrial stress activates UPRmt reporters and extends lifespan. We show that similar developmental stress is necessary and sufficient to extend Drosophila lifespan, and identify Phosphoglycerate Mutase 5 (PGAM5) as a mediator of this response. Developmental mitochondrial stress leads to activation of FoxO, via Apoptosis Signal-regulating Kinase 1 (ASK1) and Jun-N-terminal Kinase (JNK). This activation persists into adulthood and induces a select set of chaperones, many of which have been implicated in lifespan extension in flies. Persistent FoxO activation can be reversed by a high-protein diet in adulthood, through mTORC1 and GCN-2 activity. Accordingly, the observed lifespan extension is prevented on a high-protein diet and in FoxO-null flies. The diet-sensitivity of this pathway has important implications for interventions that seek to engage the UPRmt to improve metabolic health and longevity.