Bilaterians generate motor patterns with symmetries that correspond to their body plans. This is thought to arise from wiring symmetries in their motor circuits. We show that juvenile C. elegans larva has an asymmetrically wired motor circuit, but still generates a bending pattern with dorsal-ventral symmetry. In the juvenile circuit, wiring between excitatory and inhibitory motor neurons coordinates contraction of dorsal muscles with relaxation of ventral muscles, producing dorsal bends. Ventral bending is not driven by analogous wiring. Instead, ventral muscles are excited uniformly by premotor interneurons through extrasynaptic signaling. Ventral bends occur in anti-phasic entrainment to activity of the same motor neurons that drive dorsal bends. During maturation, the juvenile motor circuit is replaced by two homologous motor circuits that separately drive dorsal and ventral bending. Modeling reveals that the juvenile’s immature motor circuit provides an adequate solution to generate an adult-like gait long before the animal matures. Circuit degeneracy minimizes functional disruption during development.