Sensory perception, including thermosensation, shapes longevity in diverse organisms, but longevity-modulating signals from the sensory neurons are largely obscure. Here we show that CRH-1/CREB activation by CMK-1/CaMKI in the AFD thermosensory neuron is a key mechanism that maintains lifespan at warm temperatures in C. elegans. In response to temperature rise and crh-1 activation, the AFD neurons produce and secrete the FMRFamide neuropeptide FLP-6. Both CRH-1 and FLP-6 are necessary and sufficient for longevity at warm temperatures. Our data suggest that FLP-6 targets the AIY interneurons and engages DAF-9 sterol hormone signaling. Moreover, we show that FLP-6 signaling downregulates ins-7/insulin-like peptide and several insulin pathway genes, whose activity compromises lifespan. Our work illustrates how temperature experience is integrated by the thermosensory circuit to generate neuropeptide signals that remodel insulin and sterol hormone signaling and reveals a neuronal-endocrine circuit driven by thermosensation to promote temperature-specific longevity.