Sensory feedback from muscles and peripheral sensors acts to initiate, tune or reshape motor activity according to the state of the body. Yet, sensory neurons often show low levels of activity even in the absence of sensory input. Here we examine the functional role of spontaneous low-frequency activity of such a sensory neuron. The anterior gastric receptor (AGR) is a muscle–tendon organ in the crab stomatogastric nervous system whose phasic activity shapes the well-characterized gastric mill (chewing) and pyloric (filtering) motor rhythms. Phasic activity is driven by a spike-initiation zone near the innervated muscle. We demonstrate that AGR possesses a second spike-initiation zone, which is located spatially distant from the innervated muscle in a central section of the axon. This initiation zone generates tonic activity and is responsible for the spontaneous activity of AGR in vivo, but does not code sensory information. Rather, it is sensitive to the neuromodulator octopamine. A computational model indicates that the activity at this initiation zone is not caused by excitatory input from another neuron, but generated intrinsically. This tonic activity is functionally relevant, because it modifies the activity state of the gastric mill motor circuit and changes the pyloric rhythm. The sensory function of AGR is not impaired as phasic activity suppresses spiking at the central initiation zone. Our results thus demonstrate that sensory neurons are not mere reporters of sensory signals. Neuromodulators can elicit non-sensory coding activity in these neurons that shapes the state of the motor system.