Recent studies have demonstrated that modifications to the ratio of dietary macronutrients affect longevity in a diverse range of species. However, the degree to which levels of natural genotypic variation shape these dietary effects on longevity remains unclear. The mitochondria have long been linked to the aging process. The mitochondria possess their own genome, and previous studies have shown that mitochondrial genetic variation affects longevity in insects. Furthermore, the mitochondria are the sites in which dietary nutrients are oxidized to produce adenosine triphosphate, suggesting a capacity for dietary quality to mediate the link between mitochondrial genotype and longevity. Here, we measured longevity of male and female fruit flies, across a panel of genetic strains of Drosophila melanogaster, which vary only in their mitochondrial haplotype, when fed one of the two isocaloric diets that differed in their protein-to-carbohydrate ratio. The mitochondrial haplotype affected the longevity of flies, but the pattern of these effects differed across the two diets in males, but not in females. We discuss the implications of these results in relation to an evolutionary theory linking maternal inheritance of mitochondria to the accumulation of male-harming mitochondrial mutations, and to the theory exploring the evolution of phenotypic plasticity to novel environments.