Folates are B-group vitamins that function in one-carbon metabolism. Here we show that a specific folate can activate serotonergic neurons in C. elegans to modulate behavior through a pathway that requires the folate receptor FOLR-1 and the GON-2 calcium channel. FOLR-1 and GON-2 physically interact in a heterologous system, and both are expressed in the HSN and NSM serotonergic neurons. Both the folate 10-formyl-THF and a non-metabolic pteroate induce increases in the number of Ca2+ transients in the HSN neurons and egg laying in an FOLR-1- and GON-2-dependent manner. FOLR-1 and GON-2 are required for the activation of the NSM neurons in response to 10-formyl-THF, and for full NSM-mediated stoppage of movement when starved animals encounter bacteria. Our results demonstrate that FOLR-1 acts independently of one-carbon metabolism and suggest that 10-formyl-THF acts as a dietary signal that activates serotonergic neurons to impact behavior through a pathway that involves calcium entry.