Understanding the factors that contribute to age-related cognitive decline is imperative, particularly as age is the major risk factor for several neurodegenerative disorders. Levels of several cytokines increase in the brain during aging, including IL-1β, whose levels positively correlate with cognitive deficits. Previous reports show that reducing the activity of the mammalian target of rapamycin (mTOR) extends lifespan in yeast, nematodes, Drosophila, and mice. It remains to be established, however, whether extending lifespan with rapamycin is accompanied by an improvement in cognitive function. In this study, we show that 18-month-old mice treated with rapamycin starting at 2 months of age perform significantly better on a task measuring spatial learning and memory compared to age-matched mice on the control diet. In contrast, rapamycin does not improve cognition when given to 15-month-old mice with pre-existing, age-dependent learning and memory deficits. We further show that the rapamycin-mediated improvement in learning and memory is associated with a decrease in IL-1β levels and an increase in NMDA signaling. This is the first evidence to show that a small molecule known to increase lifespan also ameliorates age-dependent learning and memory deficits.