The simple nervous system of the nematode C. elegans consists of 302 neurons with highly reproducible morphologies, suggesting a hard-wired program of axon guidance. Surprisingly, we show here that sensory activity shapes sensory axon morphology in C. elegans. A class of mutants with deformed sensory cilia at their dendrite endings have extra axon branches, suggesting that sensory deprivation disrupts axon outgrowth. Mutations that alter calcium channels or membrane potential cause similar defects. Cell-specific perturbations of sensory activity can cause cell-autonomous changes in axon morphology. Although the sensory axons initially reach their targets in the embryo, the mutations that alter sensory activity cause extra axon growth late in development. Thus, perturbations of activity affect the maintenance of sensory axon morphology after an initial pattern of innervation is established. This system provides a genetically tractable model for identifying molecular mechanisms linking neuronal activity to nervous system structure.