TLR9 agonists have broad applications in vaccines and cancer immunotherapy. Based on the crystal structures of the ligand-TLR9 complexes, we rationally designed DNA nanostructure-based TLR9 agonists by optimizing the spatial orientation of 5'-TCG ligands and leveraging the multivalent effect of the ligand. In these designed DNA structures, the ligands simultaneously bind to the CpG motif binding site and the 5'-xCx DNA binding site, resulting in maximal TLR9 activation.