Antimicrobial factors form one arm of the innate immune system, which protects mucosal surfaces from bacterial infection. These factors can rapidly kill bacteria deposited on mucosal surfaces and prevent acute invasive infections. In many chronic infections, however, bacteria live in biofilms, which are distinct, matrix-encased communities specialized for surface persistence. The transition from a free-living, independent existence to a biofilm lifestyle can be devastating, because biofilms notoriously resist killing by host defence mechanisms and antibiotics. We hypothesized that the innate immune system possesses specific activity to protect against biofilm infections. Here we show that lactoferrin, a ubiquitous and abundant constituent of human external secretions, blocks biofilm development by the opportunistic pathogen Pseudomonas aeruginosa. This occurs at lactoferrin concentrations below those that kill or prevent growth. By chelating iron, lactoferrin stimulates twitching, a specialized form of surface motility, causing the bacteria to wander across the surface instead of forming cell clusters and biofilms. These findings reveal a specific anti-biofilm defence mechanism acting at a critical juncture in biofilm development, the time bacteria stop roaming as individuals and aggregate into durable communities.