An animal's stress response requires different adaptive strategies depending on the nature and duration of the stressor. Whereas acute stressors, such as predation, induce a rapid and energy-demanding fight-or-flight response, long-term environmental stressors induce the gradual and long-lasting activation of highly conserved cytoprotective processes1-3. In animals across the evolutionary spectrum, continued activation of the fight-or-flight response weakens the animal's resistance to environmental challenges4,5. However, the molecular and cellular mechanisms that regulate the trade-off between the flight response and long-term stressors are poorly understood. Here we show that repeated induction of the flight response in Caenorhabditis elegans shortens lifespan and inhibits conserved cytoprotective mechanisms. The flight response activates neurons that release tyramine, an invertebrate analogue of adrenaline and noradrenaline. Tyramine stimulates the insulin-IGF-1 signalling (IIS) pathway and precludes the induction of stress response genes by activating an adrenergic-like receptor in the intestine. By contrast, long-term environmental stressors, such as heat or oxidative stress, reduce tyramine release and thereby allow the induction of cytoprotective genes. These findings demonstrate that a neural stress hormone supplies a state-dependent neural switch between acute flight and long-term environmental stress responses and provides mechanistic insights into how the flight response impairs cellular defence systems and accelerates ageing.