Interactions between epithelial cells and neurons influence a range of sensory modalities including taste, touch, and smell. Vertebrate and invertebrate epidermal cells ensheath peripheral arbors of somatosensory neurons, including nociceptors, yet the developmental origins and functional roles of this ensheathment are largely unknown. Here, we describe an evolutionarily conserved morphogenetic mechanism for epidermal ensheathment of somatosensory neurites. We found that somatosensory neurons in Drosophila and zebrafish induce formation of epidermal sheaths, which wrap neurites of different types of neurons to different extents. Neurites induce formation of plasma membrane phosphatidylinositol 4,5-bisphosphate microdomains at nascent sheaths, followed by a filamentous actin network, and recruitment of junctional proteins that likely form autotypic junctions to seal sheaths. Finally, blocking epidermal sheath formation destabilized dendrite branches and reduced nociceptive sensitivity in Drosophila. Epidermal somatosensory neurite ensheathment is thus a deeply conserved cellular process that contributes to the morphogenesis and function of nociceptive sensory neurons.