Locomotion relies on neural networks called central pattern generators (CPGs) that generate periodic motor commands for rhythmic movements. In vertebrates, the excitatory synaptic drive for inducing the spinal CPG can originate from either supraspinal glutamatergic inputs or from within the spinal cord. Here we identify a spinal input to the CPG that drives spontaneous locomotion using a combination of intersectional gene expression and optogenetics in zebrafish larvae. The photo-stimulation of one specific cell type was sufficient to induce a symmetrical tail beating sequence that mimics spontaneous slow forward swimming. This neuron is the Kolmer-Agduhr cell, which extends cilia into the central cerebrospinal-fluid-containing canal of the spinal cord and has an ipsilateral ascending axon that terminates in a series of consecutive segments. Genetically silencing Kolmer-Agduhr cells reduced the frequency of spontaneous free swimming, indicating that activity of Kolmer-Agduhr cells provides necessary tone for spontaneous forward swimming. Kolmer-Agduhr cells have been known for over 75 years, but their function has been mysterious. Our results reveal that during early development in zebrafish these cells provide a positive drive to the spinal CPG for spontaneous locomotion.