Migraine is an episodic pain disorder whose pathophysiology is related to deficiency of serotonin signaling and abnormal function of the P/Q-type calcium channel, CACNA1A. Because the relationship of the CACNA1A channel to serotonin signaling is unknown and potentially of therapeutic interest we have used genetic analysis of the Caenorhabditis elegans ortholog of this calcium channel, UNC-2, to help identify candidate downstream effectors of the human channel. By genetic dissection of the lethargic mutant phenotype of unc-2, we have established an epistasis pathway showing that UNC-2 function antagonizes a transforming growth factor (TGF)-beta pathway influencing movement rate. This same UNC-2/TGF-beta pathway is required for accumulation of normal serotonin levels and stress-induced modulation of tryptophan hydroxylase (tph) expression in the serotonergic chemosensory ADF neurons, but not the NSM neurons. We also show that transgenic expression of the migraine-associated Ca2+ channel, CACNA1A, in unc-2 animals can functionally substitute for UNC-2 in stress-activated regulation of tph expression. The demonstration that these evolutionarily related channels share a conserved ability to modulate tph expression through their effects on TGF-beta signaling provides the first specific example of how CACNA1A function may influence levels of the critical migraine neurotransmitter serotonin.