The flexibility of locomotor movements requires an accurate control of their start, duration, and speed. How brainstem circuits encode and convey these locomotor parameters remains unclear. Here, we have combined in vivo calcium imaging, electrophysiology, anatomy, and behavior in adult zebrafish to address these questions. We reveal that the detailed parameters of locomotor movements are encoded by two molecularly, topographically, and functionally segregated glutamatergic neuron subpopulations within the nucleus of the medial longitudinal fasciculus. The start, duration, and changes of locomotion speed are encoded by vGlut2