The basal ganglia (BG) are critical for adaptive motor control, but the circuit principles underlying their pathway-specific modulation of target regions are not well understood. Here, we dissect the mechanisms underlying BG direct and indirect pathway-mediated control of the mesencephalic locomotor region (MLR), a brainstem target of BG that is critical for locomotion. We optogenetically dissect the locomotor function of the three neurochemically distinct cell types within the MLR: glutamatergic, GABAergic, and cholinergic neurons. We find that the glutamatergic subpopulation encodes locomotor state and speed, is necessary and sufficient for locomotion, and is selectively innervated by BG. We further show activation and suppression, respectively, of MLR glutamatergic neurons by direct and indirect pathways, which is required for bidirectional control of locomotion by BG circuits. These findings provide a fundamental understanding of how BG can initiate or suppress a motor program through cell-type-specific regulation of neurons linked to specific actions.