The oxygenation of unsaturated fatty acids by dioxygenases occurs in all kingdoms of life and produces physiologically important lipids called oxylipins. The biological roles of oxylipins have been extensively studied in animals, plants, algae and fungi, but remain largely unidentified in prokaryotes. The bacterium Pseudomonas aeruginosa displays a diol synthase activity that transforms several monounsaturated fatty acids into mono- and di-hydroxylated derivatives. Here we show that oxylipins derived from this activity inhibit flagellum-driven motility and upregulate type IV pilus-dependent twitching motility of P. aeruginosa. Consequently, these oxylipins promote bacterial organization in microcolonies, increasing the ability of P. aeruginosa to form biofilms in vitro and in vivo (in Drosophila flies). We also demonstrate that oxylipins produced by P. aeruginosa promote virulence in Drosophila flies and lettuce. Our study thus uncovers a role for prokaryotic oxylipins in the physiology and pathogenicity of bacteria.