The bacterial flagellum is a motile organelle, and the flagellar hook is a short, highly curved tubular structure that connects the flagellar motor to the long filament acting as a helical propeller. The hook is made of about 120 copies of a single protein, FlgE, and its function as a nano-sized universal joint is essential for dynamic and efficient bacterial motility and taxis. It transmits the motor torque to the helical propeller over a wide range of its orientation for swimming and tumbling. Here we report a partial atomic model of the hook obtained by X-ray crystallography of FlgE31, a major proteolytic fragment of FlgE lacking unfolded terminal regions, and by electron cryomicroscopy and three-dimensional helical image reconstruction of the hook. The model reveals the intricate molecular interactions and a plausible switching mechanism for the hook to be flexible in bending but rigid against twisting for its universal joint function.