Autism spectrum disorders (ASD) represent neurodevelopmental disorders characterized by social deficits, repetitive behaviors, and various comorbidities, including epilepsy.ANK2, which encodes a neuronal scaffolding protein, is frequently mutated in ASD, but its in vivo functions and disease-related mechanisms are largely unknown. Here, we report that mice withAnk2knockout restricted to cortical and hippocampal excitatory neurons (Ank2-cKO mice) show ASD-related behavioral abnormalities and juvenile seizure-related death. Ank2-cKO cortical neurons show abnormally increased excitability and firing rate. These changes accompanied decreases in the total level and function of the Kv7.2/KCNQ2 and Kv7.3/KCNQ3 potassium channels and the density of these channels in the enlengthened axon initial segment. Importantly, the Kv7 agonist, retigabine, rescued neuronal excitability, juvenile seizure-related death, and hyperactivity in Ank2-cKO mice. These results suggest that Ank2 regulates neuronal excitability by regulating the length of and Kv7 density in the AIS and that Kv7 channelopathy is involved in Ank2-related brain dysfunctions.