Diet profoundly affects metabolism and incidences of age-related diseases. Animals adapt their physiology to different food-types, modulating complex life-history traits like aging. The molecular mechanisms linking adaptive capacity to diet with aging are less known. We identify FLR-4 kinase as a novel modulator of aging in C. elegans, depending on bacterial diet. FLR-4 functions to prevent differential activation of the p38MAPK pathway in response to diverse food-types, thereby maintaining normal life span. In a kinase-dead flr-4 mutant, E. coli HT115 (K12 strain), but not the standard diet OP50 (B strain), is able to activate p38MAPK, elevate expression of cytoprotective genes through the nuclear hormone receptor NHR-8 and enhance life span. Interestingly, flr-4 and dietary restriction utilize similar pathways for longevity assurance, suggesting cross-talks between cellular modules that respond to diet quality and quantity. Together, our study discovers a new C. elegans gene-diet pair that controls the plasticity of aging.