Pseudomonas aeruginosa infects every type of host that has been examined by deploying multiple virulence factors. Previous studies of virulence regulation have largely focused on chemical cues, but P. aeruginosa may also respond to mechanical cues. Using a rapid imaging-based virulence assay, we demonstrate that P. aeruginosa activates virulence in response to attachment to a range of chemically distinct surfaces, suggesting that this bacterial species responds to mechanical properties of its substrates. Surface-activated virulence requires quorum sensing, but activating quorum sensing does not induce virulence without surface attachment. The activation of virulence by surfaces also requires the surface-exposed protein PilY1, which has a domain homologous to a eukaryotic mechanosensor. Specific mutation of the putative PilY1 mechanosensory domain is sufficient to induce virulence in non-surface-attached cells, suggesting that PilY1 mediates surface mechanotransduction. Triggering virulence only when cells are both at high density and attached to a surface—two host-nonspecific cues—explains how P. aeruginosa precisely regulates virulence while maintaining broad host specificity.