In mammalian neurons, the precise accumulation of sodium channels at the axonal initial segment (AIS) ensures action potential initiation. This accumulation precedes the immobilization of membrane proteins and lipids by a diffusion barrier at the AIS. Using single-particle tracking, we measured the mobility of a chimeric ion channel bearing the ankyrin-binding motif of the Nav1.2 sodium channel. We found that ankyrin G (ankG) limits membrane diffusion of ion channels when coexpressed in neuroblastoma cells. Site-directed mutants with decreased affinity for ankG exhibit increased diffusion speeds. In immature hippocampal neurons, we demonstrated that ion channel immobilization by ankG is regulated by protein kinase CK2 and occurs as soon as ankG accumulates at the AIS of elongating axons. Once the diffusion barrier is formed, ankG is still required to stabilize ion channels. In conclusion, our findings indicate that specific binding to ankG constitutes the initial step for Nav channel immobilization at the AIS membrane and precedes the establishment of the diffusion barrier.