Natural transformation is a broadly conserved mechanism of horizontal gene transfer in bacterial species that can shape evolution and foster the spread of antibiotic resistance determinants, promote antigenic variation and lead to the acquisition of novel virulence factors. Surface appendages called competence pili promote DNA uptake during the first step of natural transformation1; however, their mechanism of action has remained unclear owing to an absence of methods to visualize these structures in live cells. Here, using the model naturally transformable species Vibrio cholerae and a pilus-labelling method, we define the mechanism for type IV competence pilus-mediated DNA uptake during natural transformation. First, we show that type IV competence pili bind to extracellular double-stranded DNA via their tip and demonstrate that this binding is critical for DNA uptake. Next, we show that type IV competence pili are dynamic structures and that pilus retraction brings tip-bound DNA to the cell surface. Finally, we show that pilus retraction is spatiotemporally coupled to DNA internalization and that sterically obstructing pilus retraction prevents DNA uptake. Together, these results indicate that type IV competence pili directly bind to DNA via their tip and mediate DNA internalization through retraction during this conserved mechanism of horizontal gene transfer.