In the natural environment bacteria predominantly live adhered to a surface as part of a biofilm. While many of the components needed for biofilm assembly are known, the mechanism by which microbes sense and respond to contact with a surface is poorly understood. Bacillus subtilis is a Gram-positive model for biofilm formation. The DegS-DegU two-component system controls several multicellular behaviours in B. subtilis, including biofilm formation. Here we identify the B. subtilis flagellum as a mechanosensor that activates the DegS-DegU regulatory pathway. Inhibition of flagellar rotation by deletion or mutation of the flagellar stator gene, motB, results in an increase in both degU transcription and DegU~P driven processes, namely exoprotease production and poly-?-dl-glutamic acid biosynthesis. Similarly, inhibition of flagellar rotation by engaging the flagellar clutch or by tethering the flagella with antibodies also promotes an increase in degU transcription that is reflective of increased DegU~P levels in the cell. Collectively, these findings strongly indicate that inhibition of flagellar rotation acts as a mechanical trigger to activate the DegS-DegU two-component signal transduction system. We postulate that inhibition of flagellar rotation could function as a mechanical trigger to activate bacterial signal transduction cascades in many motile bacteria upon contact with a surface.