Dietary restriction regimens lead to enhanced stress resistance and extended lifespan in many species through the regulation of fasting and/or diet responsive mechanisms. The fasting stimulus is perceived by sensory neurons and causes behavioral and metabolic adaptations. Several studies have implicated that the nervous system is involved in the regulation of longevity. However, it remains largely unknown whether the nervous system contributes to the regulation of lifespan and/or stress resistance elicited by fasting. In this study, we first investigated the role of the nervous system in fasting-elicited longevity and stress resistance. We found that lifespan extension in Caenorhabditis elegans caused by an intermittent fasting (IF) regimen was suppressed by functional defects in sensory neurons. The IF-induced longevity was also suppressed in a mutant that lacks the enzyme required for the synthesis of an amine neurotransmitter, octopamine (OA), which acts in the absence of food, i.e., under fasting conditions. Although OA administration did not significantly extend the lifespan, it enhanced organismal resistance to oxidative stress. This enhanced resistance was suppressed by a mutation of the OA receptors, SER-3 and SER-6. Moreover, we found that OA administration promoted the nuclear translocation of DAF-16, the key transcription factor in fasting responses, and that the OA-induced enhancement of stress resistance required DAF-16. Altogether, our results suggest that OA signaling, which is triggered by the absence of food, shifts the organismal state to a more protective one to prepare for environmental stresses.