The adaptive immunity of bacteria against foreign nucleic acids, mediated by CRISPR (clustered regularly interspaced short palindromic repeats), relies on the specific incorporation of short pieces of the invading foreign DNA into a special genomic locus, termed CRISPR array. The stored sequences (spacers) are subsequently used in the form of small RNAs (crRNAs) to interfere with the target nucleic acid. We explored the DNA-binding mechanism of the immunization protein Csn2 from the human pathogen Streptococcus agalactiae using different biochemical techniques, atomic force microscopic imaging and molecular dynamics simulations. The results demonstrate that the ring-shaped Csn2 tetramer binds DNA ends through its central hole and slides inward, likely by a screw motion along the helical path of the enclosed DNA. The presented data indicate an accessory function of Csn2 during integration of exogenous DNA by end-joining.