The hyperpolarization-activated cyclic nucleotide-modulated (HCN) cation channels are opened by membrane hyperpolarization, while their activation is modulated by the binding of cyclic adenosine monophosphate (cAMP) in the cytoplasm. Here we investigate the molecular basis of cAMP channel modulation by performing molecular dynamics simulations of a segment comprising the C-linker and the cyclic nucleotide binding domain (CNBD) in the presence and absence of cAMP, based on the available crystal structure of HCN2 from mouse. In presence of cAMP, the protein undergoes an oscillation of the quaternary structure on the order of 10 ns, not observed in the apoprotein. In contrast, the absence of ligand causes conformational rearrangements within the CNBDs, driving these domains to a more flexible state, similar to that described in CNBDs of other proteins. This increased flexibility causes a rather disordered movement of the CNBDs, resulting in an inhibitory effect on the channel. We propose that the cAMP-triggered large-scale oscillation plays an important role for the channel's function, being coupled to a motion of the C-linker which, in turn, modulates the gating of the channel.