Motility of unicellular organisms occurred early in evolution with the emergence of cilia and flagella. In vertebrates, motile cilia are required for numerous functions such as clearance of the airways and determination of left-right body asymmetry. Ependymal cells lining the brain ventricles also carry motile cilia, but their biological function has remained obscure. Here, we show that ependymal cilia generate a laminar flow of cerebrospinal fluid through the cerebral aqueduct, which we term as 'ependymal flow'. The axonemal dynein heavy chain gene Mdnah5 is specifically expressed in ependymal cells, and is essential for ultrastructural and functional integrity of ependymal cilia. In Mdnah5-mutant mice, lack of ependymal flow causes closure of the aqueduct and subsequent formation of triventricular hydrocephalus during early postnatal brain development. The higher incidence of aqueduct stenosis and hydrocephalus formation in patients with ciliary defects proves the relevance of this novel mechanism in humans.