The ability to adjust the speed of locomotion is essential for survival. In limbed animals, the frequency of locomotion is modulated primarily by changing the duration of the stance phase. The underlying neural mechanisms of this selective modulation remain an open question. Here, we report a neural circuit controlling a similarly selective adjustment of locomotion frequency in Drosophila larvae. Drosophila larvae crawl using peristaltic waves of muscle contractions. We find that larvae adjust the frequency of locomotion mostly by varying the time between consecutive contraction waves, reminiscent of limbed locomotion. A specific set of muscles, the lateral transverse (LT) muscles, co-contract in all segments during this phase, the duration of which sets the duration of the interwave phase. We identify two types of GABAergic interneurons in the LT neural network, premotor neuron A26f and its presynaptic partner A31c, which exhibit segmentally synchronized activity and control locomotor frequency by setting the amplitude and duration of LT muscle contractions. Altogether, our results reveal an inhibitory central circuit that sets the frequency of locomotion by controlling the duration of the period in between peristaltic waves. Further analysis of the descending inputs onto this circuit will help understand the higher control of this selective modulation.