Insect asynchronous flight is one of the most prevalent forms of animal locomotion used by more than 600,000 species. Despite profound insights into the motor patterns1, biomechanics2,3and aerodynamics underlying asynchronous flight4,5, the architecture and function of the central-pattern-generating (CPG) neural network remain unclear. Here, on the basis of an experiment–theory approach including electrophysiology, optophysiology,Drosophilagenetics and mathematical modelling, we identify a miniaturized circuit solution with unexpected properties. The CPG network consists of motoneurons interconnected by electrical synapses that, in contrast to doctrine, produce network activity splayed out in time instead of synchronized across neurons. Experimental and mathematical evidence support a generic mechanism for network desynchronization that relies on weak electrical synapses and specific excitability dynamics of the coupled neurons. In small networks, electrical synapses can synchronize or desynchronize network activity, depending on the neuron-intrinsic dynamics and ion channel composition. In the asynchronous flight CPG, this mechanism translates unpatterned premotor input into stereotyped neuronal firing with fixed sequences of cell activation that ensure stable wingbeat power and, as we show, is conserved across multiple species. Our findings prove a wider functional versatility of electrical synapses in the dynamic control of neural circuits and highlight the relevance of detecting electrical synapses in connectomics.