Attachment is a necessary first step in bacterial commitment to surface-associated behaviors that include colonization, biofilm formation, and host-directed virulence. The Gram-negative opportunistic pathogen Pseudomonas aeruginosa can initially attach to surfaces via its single polar flagellum. Although many bacteria quickly detach, some become irreversibly attached and express surface-associated structures, such as Type IV pili, and behaviors, including twitching motility and biofilm initiation. P. aeruginosa that lack the GTPase FlhF assemble a randomly placed flagellum that is motile; however, we observed that these mutant bacteria show defects in biofilm formation comparable to those seen for non-motile, aflagellate bacteria. This phenotype was associated with altered behavior of ΔflhF bacteria immediately following surface-attachment. Forward and reverse genetic screens led to the discovery that FlhF interacts with FimV to control flagellar rotation at a surface, and implicated cAMP signaling in this pathway. Although cAMP controls many transcriptional programs in P. aeruginosa, known targets of this second messenger were not required to modulate flagellar rotation in surface-attached bacteria. Instead, alterations in switching behavior of the motor appeared to result from direct or indirect effects of cAMP on switch complex proteins and/or the stators associated with them.