Accumulating evidence suggests that early-life diet may program one's health status by causing permanent alternations in specific organs, tissues, or metabolic or homeostatic pathways, and such programming effects may propagate across generations through heritable epigenetic modifications. However, it remains uninvestigated whether postnatal dietary changes may program longevity across generations. To address this question of important biological and public health implications, newly-born flies (F0) were collected and subjected to various post-eclosion dietary manipulations (PDMs) with different protein-carbohydrate (i.e., LP, IP or HP for low-, intermediate- or high-protein) contents or a control diet (CD). Longevity and fecundity analyses were performed with these treated F0 flies and their F1, F2 and F3 offspring, while maintained on CD at all times. The LP and HP PDMs shortened longevity, while the IP PDM extended longevity significantly up to the F3 generation. Furthermore, the LP reduced while the IP PDM increased lifetime fecundity across the F0-F2 generations. Our observations establish the first animal model for studying transgenerational inheritance of nutritional programming of longevity, making it possible to investigate the underlying epigenetic mechanisms and identify gene targets for drug discovery in future studies.