Acquisition of foreign DNA by natural transformation is an important mechanism of adaptation and evolution in diverse microbial species. Here, we characterize the mechanism of ComM, a broadly conserved AAA+ protein previously implicated in homologous recombination of transforming DNA (tDNA) in naturally competent Gram-negative bacterial species. In vivo, we find that ComM was required for efficient comigration of linked genetic markers in Vibrio cholerae and Acinetobacter baylyi, which is consistent with a role in branch migration. Also, ComM was particularly important for integration of tDNA with increased sequence heterology, suggesting that this branch migration promotes the acquisition of novel DNA sequences. In vitro, we show that purified ComM binds ssDNA, oligomerizes into a hexameric ring, and has 5′ to 3′ helicase activity. Based on these data, we propose a model for tDNA integration during natural transformation. This study provides mechanistic insight into the enigmatic steps involved in tDNA integration and uncovers the function of a protein required for this conserved mechanism of horizontal gene transfer.