Outer and inner dynein arms generate force for the flagellar/ciliary bending motion. Although nucleotide-induced structural change of dynein heavy chains (the ATP-driven motor) was proven in vitro, our lack of knowledge in situ has precluded an understanding of the bending mechanism. Here we reveal nucleotide-induced global structural changes of the outer and inner dynein arms of Chlamydomonas reinhardtii flagella in situ using electron cryotomography. The ATPase domains of the dynein heavy chains move toward the distal end, and the N-terminal tail bends sharply during product release. This motion could drive the adjacent microtubule to cause a sliding motion. In contrast to in vitro results, in the presence of nucleotides, outer dynein arms coexist as clusters of apo or nucleotide-bound forms in situ. This implies a cooperative switching, which may be related to the mechanism of bending.