Feeding requires the integration of homeostatic drives with emotional states relevant to food procurement in potentially hostile environments. The ventromedial hypothalamus (VMH) regulates feeding and anxiety, but how these are controlled in a concerted manner remains unclear. Using pharmacogenetic, optogenetic, and calcium imaging approaches with a battery of behavioral assays, we demonstrate that VMH steroidogenic factor 1 (SF1) neurons constitute a nutritionally sensitive switch, modulating the competing motivations of feeding and avoidance of potentially dangerous environments. Acute alteration of SF1 neuronal activity alters food intake via changes in appetite and feeding-related behaviors, including locomotion, exploration, anxiety, and valence. In turn, intrinsic SF1 neuron activity is low during feeding and increases with both feeding termination and stress. Our findings identify SF1 neurons as a key part of the neurocircuitry that controls both feeding and related affective states, giving potential insights into the relationship between disordered eating and stress-associated psychological disorders in humans