In the developing nervous system, distribution of membrane molecules, particularly axon guidance receptors, is often restricted to specific segments of axons. Such localization of membrane molecules can be important for the formation and function of neural networks; however, how this patterning within axons is achieved remains elusive. Here we show that Drosophila neurons in culture establish intra-axonal patterns in a cell-autonomous manner; several membrane molecules localize to either proximal or distal axon segments without cell-cell contacts. This distinct patterning of membrane proteins is not explained by a simple temporal control of expression, and likely involves spatially controlled vesicular targeting or retrieval. Mobility of transmembrane molecules is restricted at the boundary of intra-axonal segments, indicating that the axonal membrane is compartmentalized by a barrier mechanism. We propose that this intra-axonal compartmentalization is an intrinsic property of Drosophila neurons that provides a basis for the structural and functional development of the nervous system.