Hyperpolarization-activated cyclic nucleotide-gated (HCN) channels1 are essential for pacemaking activity and neural signalling2,3. Drugs inhibiting HCN1 are promising candidates for management of neuropathic pain4 and epileptic seizures5. The general anaesthetic propofol (2,6-di-iso-propylphenol) is a known HCN1 allosteric inhibitor6 with unknown structural basis. Here, using single-particle cryo-electron microscopy and electrophysiology, we show that propofol inhibits HCN1 by binding to a mechanistic hotspot in a groove between the S5 and S6 transmembrane helices. We found that propofol restored voltage-dependent closing in two HCN1 epilepsy-associated polymorphisms that act by destabilizing the channel closed state: M305L, located in the propofol-binding site in S5, and D401H in S6 (refs. 7,8). To understand the mechanism of propofol inhibition and restoration of voltage-gating, we tracked voltage-sensor movement in spHCN channels and found that propofol inhibition is independent of voltage-sensor conformational changes. Mutations at the homologous methionine in spHCN and an adjacent conserved phenylalanine in S6 similarly destabilize closing without disrupting voltage-sensor movements, indicating that voltage-dependent closure requires this interface intact. We propose a model for voltage-dependent gating in which propofol stabilizes coupling between the voltage sensor and pore at this conserved methionine-phenylalanine interface in HCN channels. These findings unlock potential exploitation of this site to design specific drugs targeting HCN channelopathies.