As Western diets continue to include an ever-increasing amount of sugar, there has been a rise in obesity and type 2 diabetes. To avoid metabolic diseases, the body must maintain proper metabolism, even on a high-sugar diet. In both humans and , excess sugar (glucose) is stored as glycogen. Here, we find that animals increased stored glycogen as they aged, whereas even young adult animals had increased stored glycogen on a high-sugar diet. Decreasing the amount of glycogen storage by modulating the glycogen synthase, , a key enzyme in glycogen synthesis, can extend lifespan, prolong healthspan, and limit the detrimental effects of a high-sugar diet. Importantly, limiting glycogen storage leads to a metabolic shift whereby glucose is now stored as trehalose. Two additional means to increase trehalose show similar longevity extension. Increased trehalose is entirely dependent on a functional FOXO transcription factor DAF-16 and autophagy to promote lifespan and healthspan extension. Our results reveal that when glucose is stored as glycogen, it is detrimental, whereas, when stored as trehalose, animals live a longer, healthier life if DAF-16 is functional. Taken together, these results demonstrate that trehalose modulation may be an avenue for combatting high-sugar-diet pathology.