Hyperpolarization-activated cyclic nucleotide-gated (HCN) channels encode neuronal and cardiac pacemaker currents. The composition of pacemaker channel complexes in different tissues is poorly understood, and the presence of additional HCN modulating subunits was speculated. Here we show that vesicle-associated membrane protein-associated protein B (VAPB), previously associated with a familial form of amyotrophic lateral sclerosis 8, is an essential HCN1 and HCN2 modulator. VAPB significantly increases HCN2 currents and surface expression and has a major influence on the dendritic neuronal distribution of HCN2. Severe cardiac bradycardias in VAPB-deficient zebrafish and VAPB-/- mice highlight that VAPB physiologically serves to increase cardiac pacemaker currents. An altered T-wave morphology observed in the ECGs of VAPB-/- mice supports the recently proposed role of HCN channels for ventricular repolarization. The critical function of VAPB in native pacemaker channel complexes will be relevant for our understanding of cardiac arrhythmias and epilepsies, and provides an unexpected link between these diseases and amyotrophic lateral sclerosis.