Chronic pain is a significant health problem worldwide. Recent evidence has suggested that the ventral hippocampus is dysfunctional in humans and rodents, with decreased neuronal excitability and connectivity with other brain regions, parallel pain chronicity, and persistent nociceptive hypersensitivity. But the molecular mechanisms underlying hippocampal modulation of pain remain poorly elucidated. In this study, we used ex vivo whole-cell patch-clamp recording, immunofluorescence staining, and behavioral tests to examine whether hyperpolarization-activated cyclic nucleotide-gated channels 2 (HCN2) in the ventral hippocampal CA1 (vCA1) were involved in regulating nociceptive perception and CFA-induced inflammatory pain in mice. Reduced sag potential and firing rate of action potentials were observed in vCA1 pyramidal neurons from CFA-injected mice. Moreover, the expression of HCN2, but not HCN1, in vCA1 decreased in mice injected with CFA. HCN2 knockdown in vCA1 pyramidal neurons induced thermal hypersensitivity, whereas overexpression of HCN2 alleviated thermal hyperalgesia induced by intraplantar injection of CFA in mice. Our findings suggest that HCN2 in the vCA1 plays an active role in pain modulation and could be a promising target for the treatment of chronic pain.