Voltage-dependent sodium channels are uniformly distributed along unmyelinated axons, but are highly concentrated at nodes of Ranvier in myelinated axons. Here, we show that this pattern is associated with differential localization of distinct sodium channel alpha subunits to the unmyelinated and myelinated zones of the same retinal ganglion cell axons. In adult axons, Na(v)1.2 is localized to the unmyelinated zone, whereas Na(v)1.6 is specifically targeted to nodes. During development, Na(v)1.2 is expressed first and becomes clustered at immature nodes of Ranvier, but as myelination proceeds, Na(v)1.6 replaces Na(v)1.2 at nodes. In Shiverer mice, which lack compact myelin, Na(v)1.2 is found throughout adult axons, whereas little Na(v)1.6 is detected. Together, these data show that sodium channel isoforms are differentially targeted to distinct domains of the same axon in a process associated with formation of compact myelin.