Trypanosoma brucei is a pathogenic unicellular eukaryote that infects humans and other mammals in sub-Saharan Africa. A central feature of trypanosome biology is the single flagellum of the parasite, which is an essential and multifunctional organelle that facilitates cell propulsion, controls cell morphogenesis and directs cytokinesis. Moreover, the flagellar membrane is a specialized subdomain of the cell surface that mediates attachment to host tissues and harbours multiple virulence factors. In this Review, we discuss the structure, assembly and function of the trypanosome flagellum, including canonical roles in cell motility as well as novel and emerging roles in cell morphogenesis and host-parasite interactions.