Hyperpolarization-activated cation (HCN) channels are believed to be involved in the generation of cardiac pacemaker depolarizations as well as in the control of neuronal excitability and plasticity. The contributions of the four individual HCN channel isoforms (HCN1-4) to these diverse functions are not known. Here we show that HCN2-deficient mice exhibit spontaneous absence seizures. The thalamocortical relay neurons of these mice displayed a near complete loss of the HCN current, resulting in a pronounced hyperpolarizing shift of the resting membrane potential, an altered response to depolarizing inputs and an increased susceptibility for oscillations. HCN2-null mice also displayed cardiac sinus dysrhythmia, a reduction of the sinoatrial HCN current and a shift of the maximum diastolic potential to hyperpolarized values. Mice with cardiomyocyte- specific deletion of HCN2 displayed the same dysrhythmia as mice lacking HCN2 globally, indicating that the dysrhythmia is indeed caused by sinoatrial dysfunction. Our results define the physiological role of the HCN2 subunit as a major determinant of membrane resting potential that is required for regular cardiac and neuronal rhythmicity.