The licensed drug rapamycin has potential to be repurposed for geroprotection. A key challenge is to avoid adverse side effects from continuous dosing. Here we show that geroprotective effects of chronic rapamycin treatment can be obtained with a brief pulse of the drug in early adulthood in female Drosophila and mice. In Drosophila, a brief, early rapamycin treatment of adults extended lifespan and attenuated age-related decline in the intestine to the same degree as lifelong dosing. Lasting memory of earlier treatment was mediated by elevated autophagy in intestinal enterocytes, accompanied by increased levels of intestinal LManV and lysozyme. Brief elevation of autophagy in early adulthood itself induced a long-term increase in autophagy. In mice, a 3-month, early treatment also induced a memory effect, with maintenance similar to chronic treatment, of lysozyme distribution, Man2B1 level in intestinal crypts, Paneth cell architecture and gut barrier function, even 6 months after rapamycin was withdrawn.