Natural genetic transformation can facilitate gene transfer in many genera of bacteria and requires the presence of extracellular DNA. Although cell lysis can contribute to this extracellular DNA pool, several studies have suggested that the secretion of DNA from living bacteria may also provide genetic material for transformation. This paper reviews the evidence for specific secretion of DNA from intact bacteria into the extracellular environment and examines this behaviour from a population-genetics perspective. A mathematical model demonstrates that the joint action of DNA secretion and transformation creates a novel type of gene-level natural selection. This model demonstrates that gene-level selection could explain the existence of DNA secretion mechanisms that provide no benefit to individual cells or populations of bacteria. Additionally, the model predicts that any trait affecting DNA secretion will experience selection at the gene level in a transforming population. This analysis confirms that the secretion of DNA from intact bacterial cells is fully explicable with evolutionary theory, and reveals a novel mechanism for bacterial evolution.