Hyperpolarization-activated cyclic nucleotide–gated (HCN) channels are responsible for the functional hyperpolarization-activated current ( Ih) in dorsal root ganglion (DRG) neurons, playing an important role in pain processing. We found that the known analgesic loperamide inhibited Ih channels in rat DRG neurons. Loperamide blocked Ih in a concentration-dependent manner, with an IC50 = 4.9 ± 0.6 and 11.0 ± 0.5 μM for large- and small-diameter neurons, respectively. Loperamide-induced Ih inhibition was unrelated to the activation of opioid receptors and was reversible, voltage-dependent, use-independent, and was associated with a negative shift of V1/2 for Ih steady-state activation. Loperamide block of Ih was voltage-dependent, gradually decreasing at more hyperpolarized membrane voltages from 89% at –60 mV to 4% at –120 mV in the presence of 3.7 μM loperamide. The voltage sensitivity of block can be explained by a loperamide-induced shift in the steady-state activation of Ih. Inclusion of 10 μM loperamide into the recording pipette did not affect Ih voltage for half-maximal activation, activation kinetics, and the peak current amplitude, whereas concurrent application of equimolar external loperamide produced a rapid, reversible Ih inhibition. The observed loperamide-induced Ih inhibition was not caused by the activation of peripheral opioid receptors because the broad-spectrum opioid receptor antagonist naloxone did not reverse Ih inhibition. Therefore we suggest that loperamide inhibits Ih by direct binding to the extracellular region of the channel. Because Ih channels are involved in pain processing, loperamide-induced inhibition of Ih channels could provide an additional molecular mechanism for its analgesic action.