Many bacteria swim in liquid or swarm over solid surfaces by synthesizing rotary flagella. The same bacteria that are motile also commonly form nonmotile multicellular aggregates called biofilms. Biofilms are an important part of the lifestyle of pathogenic bacteria, and it is assumed that there is a motility-to-biofilm transition wherein the inhibition of motility promotes biofilm formation. The transition is largely inferred from regulatory mutants that reveal the opposite regulation of the two phenotypes. Here, we review the regulation of motility during biofilm formation in Bacillus, Pseudomonas, Vibrio, and Escherichia, and we conclude that the motility-to-biofilm transition, if necessary, likely involves two steps. In the short term, flagella are functionally regulated to either inhibit rotation or modulate the basal flagellar reversal frequency. Over the long term, flagellar gene transcription is inhibited and in the absence of de novo synthesis, flagella are diluted to extinction through growth. Both short-term and long-term motility inhibition is likely important to stabilize cell aggregates and optimize resource investment. We emphasize the newly discovered flagellar functional regulators and speculate that others await discovery in the context of biofilm formation.