Acute infections are associated with a set of stereotypic behavioral responses, including anorexia, lethargy, and social withdrawal. Although these so-called sickness behaviors are the most common and familiar symptoms of infections, their roles in host defense are largely unknown. Here, we investigated the role of anorexia in models of bacterial and viral infections. We found that anorexia was protective while nutritional supplementation was detrimental in bacterial sepsis. Furthermore, glucose was necessary and sufficient for these effects. In contrast, nutritional supplementation protected against mortality from influenza infection and viral sepsis, whereas blocking glucose utilization was lethal. In both bacterial and viral models, these effects were largely independent of pathogen load and magnitude of inflammation. Instead, we identify opposing metabolic requirements tied to cellular stress adaptations critical for tolerance of differential inflammatory states.