In most environments, bacteria reside primarily in biofilms, which are social consortia of cells that are embedded in an extracellular matrix and undergo developmental programmes resulting in a predictable biofilm 'life cycle'. Recent research on many different bacterial species has now shown that the final stage in this life cycle includes the production and release of differentiated dispersal cells. The formation of these cells and their eventual dispersal is initiated through diverse and remarkably sophisticated mechanisms, suggesting that there are strong evolutionary pressures for dispersal from an otherwise largely sessile biofilm. The evolutionary aspect of biofilm dispersal is now being explored through the integration of molecular microbiology with eukaryotic ecological and evolutionary theory, which provides a broad conceptual framework for the diversity of specific mechanisms underlying biofilm dispersal. Here, we review recent progress in this emerging field and suggest that the merging of detailed molecular mechanisms with ecological theory will significantly advance our understanding of biofilm biology and ecology.