Migraine is believed to be initiated by neuronal activity in the CNS, that triggers excitation of nociceptive trigeminal ganglion (TG) nerve fibers innervating the meninges and thus causes a unilateral throbbing headache. Drugs that precipitate or potentiate migraine are known to elevate intracellular levels of the cyclic nucleotides cAMP or cGMP, while anti-migraine treatments couple to signaling pathways that reduce cAMP or cGMP, suggesting an involvement of these cyclic nucleotides in migraine. Members of the HCN ion channel family are activated by direct binding of cAMP or cGMP, suggesting in turn that a member of this family may be a critical trigger of migraine. Here, we show that pharmacological block or targeted genetic deletion of HCN2 abolishes migraine-like pain in three rodent migraine models (in both sexes). Induction of migraine-like pain in these models triggered expression of the protein C-FOS, a marker of neuronal activity, in neurons of the trigeminocervical complex (TCC), where TG neurons terminate, and C-FOS expression was reversed by peripheral HCN2 inhibition. HCN2 block inhibited both evoked and spontaneous neuronal activity in nociceptive TG neurons. The NO donor glyceryl trinitrate (GTN) caused an increase in cGMP in the TG Exposing isolated TG neurons to GTN caused a rightward shift in the voltage dependence of HCN currents and thus increased neuronal excitability. This work identifies HCN2 as a novel target for the development of migraine treatments. Migraine is believed to be initiated by localized excitability of neurons within the CNS, but the most disturbing symptom, the characteristic throbbing migraine headache pain, is widely agreed to be caused by activity in afferent pain-sensitive (nociceptive) nerve fibers of the trigeminal nerve. Using a variety of preclinical models of migraine, we identify the HCN2 ion channel as the molecular source of trigeminal hyperexcitability in migraine and we show that pharmacological or genetic inhibition of HCN2 can relieve migraine-like pain symptoms. The work highlights the HCN2 ion channel as a potential pharmacological target for the development of novel analgesics effective in migraine.