K+ channels undergo a time-dependent slow inactivation process that plays a key role in modulating cellular excitability. Here we show that in the prokaryotic proton-gated K+ channel KcsA, the number and strength of hydrogen bonds between residues in the selectivity filter and its adjacent pore helix determine the rate and extent of C-type inactivation. Upon channel activation, the interaction between residues at positions Glu71 and Asp80 promotes filter constriction parallel to the permeation pathway, which affects K+-binding sites and presumably abrogates ion conduction. Coupling between these two positions results in a quantitative correlation between their interaction strength and the stability of the inactivated state. Engineering of these interactions in the eukaryotic voltage-dependent K+ channel Kv1.2 suggests that a similar mechanistic principle applies to other K+ channels. These observations provide a plausible physical framework for understanding C-type inactivation in K+ channels.