The nervous and endocrine systems coordinately monitor and regulate nutrient availability to maintain energy homeostasis. Sensory detection of food regulates internal nutrient availability in a manner that anticipates food intake, but sensory pathways that promote anticipatory physiological changes remain unclear. Here, we identify serotonergic (5-HT) neurons as critical mediators that transform gustatory detection by sensory neurons into the activation of insulin-producing cells and enteric neurons in Drosophila. One class of 5-HT neurons responds to gustatory detection of sugars, excites insulin-producing cells, and limits consumption, suggesting that they anticipate increased nutrient levels and prevent overconsumption. A second class of 5-HT neurons responds to gustatory detection of bitter compounds and activates enteric neurons to promote gastric motility, likely to stimulate digestion and increase circulating nutrients upon food rejection. These studies demonstrate that 5-HT neurons relay acute gustatory detection to divergent pathways for longer-term stabilization of circulating nutrients.