In species ranging from humans to Caenorhabditis elegans, dietary restriction (DR) grants numerous benefits, including enhanced learning. The precise mechanisms by which DR engenders benefits on processes related to learning remain poorly understood. As a result, it is unclear whether the learning benefits of DR are due to myriad improvements in mechanisms that collectively confer improved cellular health and extension of organismal lifespan or due to specific neural mechanisms. Using an associative learning paradigm in C. elegans, we investigated the effects of DR as well as manipulations of insulin, mechanistic target of rapamycin (mTOR), AMP-activated protein kinase (AMPK), and autophagy pathways—processes implicated in longevity—on learning. Despite their effects on a vast number of molecular effectors, we found that the beneficial effects on learning elicited by each of these manipulations are fully dependent on depletion of kynurenic acid (KYNA), a neuroinhibitory metabolite. KYNA depletion then leads, in an N-methyl D-aspartate receptor (NMDAR)-dependent manner, to activation of a specific pair of interneurons with a critical role in learning. Thus, fluctuations in KYNA levels emerge as a previously unidentified molecular mechanism linking longevity and metabolic pathways to neural mechanisms of learning. Importantly, KYNA levels did not alter lifespan in any of the conditions tested. As such, the beneficial effects of DR on learning can be attributed to changes in a nutritionally sensitive metabolite with neuromodulatory activity rather than indirect or secondary consequences of improved health and extended longevity.