Synthetic oligodeoxyribonucleotides (ODNs) containing CpG (unmethylated deoxycytidylyl-deoxyguanosine dinucleotide) motifs activate endosomal TLR9. The nucleotide sequence, length, and dimerization properties of ODNs modulate their activation of TLR9. We performed a systematic investigation of the sequence motifs of B-class and C-class phosphodiester ODNs to identify the sequence properties that govern TLR9 activation. ODNs shorter than 21 nt and with the adenosine adjacent to the cytidine-guanosine (CG) dinucleotide motif led to a significant loss of the propensity to activate TLR9. The distance between the stimulatory CpG motifs within the ODN fine-tunes the activation of B cells. The minimal ODNs that activate human TLR9 comprise 2 CG dinucleotides separated by 6–10 nt, where the first CpG motif is preceded by the 5′-thymidine and the elongated poly-thymidine tail at the 3′ end of the ODN. The minimal sequence provides insight into the molecular mechanism of TLR9 ligand recognition. On the basis of sequence requirements, we conclude that two binding sites with different affinities for CG are formed in the human TLR9 dimer, with a very stringent binding site interacting with the 5′ CpG motif.