Axonal and somatodendritic plasma membranes of polarized neurons express distinct sets of functional molecules. It is known that the neuronal polarity can be maintained by a barrier that impedes diffusional mixing of membrane components between the two domains. Using betaIV-spectrin knockout mice, we demonstrate the involvement of this cytoskeletal protein in the formation of a barrier that selectively blocks lateral mobility of L1 cell adhesion molecule (L1CAM) at the axon initial segment of hippocampal neurons. We also show that the betaIV-spectrin-based barrier is required for the axon-specific distribution of L1CAM both in vitro and in vivo. The barrier activity against L1CAM may depend on direct interactions of L1CAM with ankyrinG, a protein binding to betaIV-spectrin, rather than on steric hindrance by other transmembrane proteins clustered at the axon initial segment. Our results highlight the role of betaIV-spectrin and ankyrinG as critical components of a selective barrier against L1CAM.