The type IV secretion system (TFSSs) is a multifunctional family of translocation pathways that mediate the transfer of DNA among bacteria and deliver DNA and proteins to eukaryotic cells during bacterial infections. Horizontal transmission has dominated the evolution of the TFSS, as demonstrated here by a lack of congruence between the tree topology inferred from components of the TFSS and the presumed bacterial species divergence pattern. A parsimony analysis suggests that conjugation represents the ancestral state and that the divergence from conjugation to secretion of effector molecules has occurred independently at multiple sites in the tree. The result shows that the nodes at which functional shifts have occurred coincide with those of horizontal gene transfers among distantly related bacteria. We suggest that it is the transfer between species that paved the way for the divergence of the TFSSs and discuss the general role of horizontal gene transfers for the evolution of novel gene functions.