Synaptic actions of brain-derived neurotrophic factor (BDNF) are "gated" by cAMP, but the underlying molecular mechanisms remain unclear. Here we report that cAMP regulates BDNF function by modulating TrkB receptor signaling and trafficking in mature hippocampal neurons. cAMP gates TrkB phosphorylation with three characteristic features: BDNF-induced TrkB phosphorylation was attenuated by inhibitors of cAMP signaling, potentiated by cAMP analogs, and activation of cAMP pathway alone had no effect. In addition, cAMP facilitated trafficking of TrkB to dendritic spines, possibly by promoting its interaction with synaptic scaffolding protein PSD-95. Norepinepherinergic and dopaminergic agonists, which elevate intracellular cAMP concentration, also enhance TrkB phosphorylation and its translocation to spines. Long-term modulation of spine density, but not number of primary dendrites, by BDNF was gated by cAMP. These results reveal a specific role of cAMP in controlling BDNF actions in the brain, and provide new insights into the molecular mechanism underlying cAMP gating.