Somatosensory information from the periphery is routed to the spinal cord through centrally-projecting sensory axons that cross into the central nervous system (CNS) via the dorsal root entry zone (DREZ). The glial cells that ensheath these axons ensure rapid propagation of this information. Despite the importance of this glial-axon arrangement, how this afferent nerve is assembled during development is unknown. Using in vivo, time-lapse imaging we show that as centrally-projecting pioneer axons from dorsal root ganglia (DRG) enter the spinal cord, they initiate expression of the cytokine TNFalpha. This induction coincides with ensheathment of these axons by associated glia via a TNF receptor 2 (TNFR2)-mediated process. This work identifies a signaling cascade that mediates peripheral glial-axon interactions and it functions to ensure that DRG afferent projections are ensheathed after pioneer axons complete their navigation, which promotes efficient somatosensory neural function.