Myocardial repolarization capacity varies with sex, age, and pathology; the molecular basis for this variation is incompletely understood. Here, we show that the transcript for KCNE4, a voltage-gated potassium (Kv) channel β subunit associated with human atrial fibrillation, was 8-fold more highly expressed in the male left ventricle compared with females in young adult C57BL/6 mice (P < 0.05). Similarly, Kv current density was 25% greater in ventricular myocytes from young adult males (P < 0.05). Germ-line Kcne4 deletion eliminated the sex-specific Kv current disparity by diminishing ventricular fast transient outward current (Ito,f) and slowly activating K(+) current (IK,slow1). Kcne4 deletion also reduced Kv currents in male mouse atrial myocytes, by >45% (P < 0.001). As we previously found for Kv4.2 (which generates mouse Ito,f), heterologously expressed KCNE4 functionally regulated Kv1.5 (the Kv α subunit that generates IKslow1 in mice). Of note, in postmenopausal female mice, ventricular repolarization was impaired by Kcne4 deletion, and ventricular Kcne4 expression increased to match that of males. Moreover, castration diminished male ventricular Kcne4 expression 2.8-fold, whereas 5α-dihydrotestosterone (DHT) implants in castrated mice increased Kcne4 expression >3-fold (P = 0.01) to match noncastrated levels. KCNE4 is thereby shown to be a DHT-regulated determinant of cardiac excitability and a molecular substrate for sex- and age-dependent cardiac arrhythmogenesis.