Chronic pain is a significant problem that afflicts individuals and society, and for which the current clinical treatment is inadequate. In addition, the neural circuit and molecular mechanisms subserving chronic pain remain largely uncharacterized. Herein we identified enhanced activity of a glutamatergic neuronal circuit that encompasses projections from the ventral posterolateral nucleus (VPL) to the glutamatergic neurons of the hindlimb primary somatosensory cortex (S1HL), driving allodynia in mouse models of chronic pain. Optogenetic inhibition of this VPL→S1HL circuit reversed allodynia, whereas the enhancement of its activity provoked hyperalgesia in control mice. In addition, we found that the expression and function of the HCN2 (hyperpolarization-activated cyclic nucleotide-gated channel 2) were increased in VPL neurons under conditions of chronic pain. Using calcium imaging, we demonstrated that downregulation of HCN2 channels in the VPL neurons abrogated the rise in S1HL neuronal activity while alleviating allodynia in mice with chronic pain. With these data, we propose that dysfunction in HCN2 channels in the VPL→S1HL thalamocortical circuit and their upregulation occupy essential roles in the development of chronic pain.