To establish the relationship between locomotory behavior and dynamics of neural circuits in the nematode C. elegans we combined molecular and theoretical approaches. In particular, we quantitatively analyzed the motion of C. elegans with defective synaptic GABA and acetylcholine transmission, defective muscle calcium signaling, and defective muscles and cuticle structures, and compared the data with our systems level circuit model. The major experimental findings are: (1) anterior-to-posterior gradients of body bending flex for almost all strains both for forward and backward motion, and for neuronal mutants, also analogous weak gradients of undulatory frequency, (2) existence of some form of neuromuscular (stretch receptor) feedback, (3) invariance of neuromuscular wavelength, (4) biphasic dependence of frequency on synaptic signaling, and (5) decrease of frequency with increase of the muscle time constant. Based on (1) we hypothesize that the Central Pattern Generator (CPG) is located in the head both for forward and backward motion. Points (1) and (2) are the starting assumptions for our theoretical model, whose dynamical patterns are qualitatively insensitive to the details of the CPG design if stretch receptor feedback is sufficiently strong and slow. The model reveals that stretch receptor coupling in the body wall is critical for generation of the neuromuscular wave. Our model agrees with our behavioral data (3), (4), and (5), and with other pertinent published data, e.g., that frequency is an increasing function of muscle gap-junction coupling.