Idiopathic scoliosis (IS) affects 3% of children worldwide, yet the mechanisms underlying this spinal deformity remain unknown. Here we show thatptk7mutant zebrafish, a faithful developmental model of IS, exhibit defects in ependymal cell cilia development and cerebrospinal fluid (CSF) flow. Transgenic reintroduction of Ptk7 in motile ciliated lineages prevents scoliosis inptk7mutants, and mutation of multiple independent cilia motility genes yields IS phenotypes. We define a finite developmental window for motile cilia in zebrafish spine morphogenesis. Notably, restoration of cilia motility after the onset of scoliosis blocks spinal curve progression. Together, our results indicate a critical role for cilia-driven CSF flow in spine development, implicate irregularities in CSF flow as an underlying biological cause of IS, and suggest that noninvasive therapeutic intervention may prevent severe scoliosis.