Natural transformation is a dominant force in bacterial evolution by promoting horizontal gene transfer. This process may have devastating consequences, such as the spread of antibiotic resistance or the emergence of highly virulent clones. However, uptake and recombination of foreign DNA are most often deleterious to competent species. Therefore, model naturally transformable Gram-negative bacteria, including the human pathogen Neisseria meningitidis, have evolved means to preferentially take up homotypic DNA containing short and genus-specific sequence motifs. Despite decades of intense investigations, the DNA uptake sequence receptor in Neisseria species has remained elusive. We show here, using a multidisciplinary approach combining biochemistry, molecular genetics, and structural biology, that meningococcal type IV pili bind DNA through the minor pilin ComP via an electropositive stripe that is predicted to be exposed on the filaments surface and that ComP displays an exquisite binding preference for DNA uptake sequence. Our findings illuminate the earliest step in natural transformation, reveal an unconventional mechanism for DNA binding, and suggest that selective DNA uptake is more widespread than previously thought.