Reduced nutrient intake is a widely conserved manifestation of sickness behavior with poorly characterized effects on adaptive immune responses. During infectious challenges, naive T cells encountering their cognate antigen become activated and differentiate into highly proliferative effector T cells. Despite their evident metabolic shift upon activation, it remains unclear how effector T cells respond to changes in nutrient availability in vivo. Here, we show that spontaneous or imposed feeding reduction during infection decreases the numbers of splenic lymphocytes. Effector T cells showed cell-intrinsic responses dependent on the nuclear receptor Farnesoid X Receptor (FXR). Deletion of FXR in T cells prevented starvation-induced loss of lymphocytes and increased effector T cell fitness in nutrient-limiting conditions, but imparted greater weight loss to the host. FXR deficiency increased the contribution of glutamine and fatty acids toward respiration and enhanced cell survival under low-glucose conditions. Provision of glucose during anorexia of infection rescued effector T cells, suggesting that this sugar is a limiting nutrient for activated lymphocytes and that alternative fuel usage may affect cell survival in starved animals. Altogether, we identified a mechanism by which the host scales immune responses according to food intake, featuring FXR as a T cell-intrinsic sensor.