Motile cilia and flagella beat rhythmically on the surface of cells to power the flow of fluid and to enable spermatozoa and unicellular eukaryotes to swim. In humans, defective ciliary motility can lead to male infertility and a congenital disorder called primary ciliary dyskinesia (PCD), in which impaired clearance of mucus by the cilia causes chronic respiratory infections1. Ciliary movement is generated by the axoneme, a molecular machine consisting of microtubules, ATP-powered dynein motors and regulatory complexes2. The size and complexity of the axoneme has so far prevented the development of an atomic model, hindering efforts to understand how it functions. Here we capitalize on recent developments in artificial intelligence-enabled structure prediction and cryo-electron microscopy (cryo-EM) to determine the structure of the 96-nm modular repeats of axonemes from the flagella of the algaChlamydomonas reinhardtiiand human respiratory cilia. Our atomic models provide insights into the conservation and specialization of axonemes, the interconnectivity between dyneins and their regulators, and the mechanisms that maintain axonemal periodicity. Correlated conformational changes in mechanoregulatory complexes with their associated axonemal dynein motors provide a mechanism for the long-hypothesized mechanotransduction pathway to regulate ciliary motility. Structures of respiratory-cilia doublet microtubules from four individuals with PCD reveal how the loss of individual docking factors can selectively eradicate periodically repeating structures.