Interactions with ankyrin-G are crucial to the localization of voltage-gated sodium channels (VGSCs) at the axon initial segment and for neurons to initiate action potentials. This conserved 9-amino acid motif ((V/A)P(I/L)AXXE(S/D)D) is required for ankyrin-G binding and functions to localize sodium channels to a variety of 'excitable' membrane domains both inside and outside of the nervous system. This motif has also been identified in the potassium channel 6TM proteins KCNQ2 and KCNQ3, that correspond to the M channels that exert a crucial influence over neuronal excitability. KCNQ2/KCNQ3 channels are preferentially localized to the surface of axons both at the axonal initial segment and more distally, and this axonal initial segment targeting of surface KCNQ channels is mediated by these ankyrin-G binding motifs of KCNQ2 and KCNQ3. KCNQ3 is a major determinant of M channel localization to the AIS, rather than KCNQ2. Phylogenetic analysis reveals that anchor motifs evolved sequentially in chordates (NaV channel) and jawed vertebrates (KCNQ2/3).