The CAG and CTG trinucleotide repeat expansions cause more than 10 human neurodegenerative diseases. Intrastrand hairpins formed by trinucleotide repeats contribute to repeat expansions, establishing them as potential drug targets. High-resolution structural determination of CAG and CTG hairpins poses as a long-standing goal to aid drug development, yet it has not been realized due to the intrinsic conformational flexibility of repetitive sequences. We herein investigate the solution structures of CTG hairpins using nuclear magnetic resonance (NMR) spectroscopy and found that four CTG repeats with a clamping G-C base pair was able to form a stable hairpin structure. We determine the first solution NMR structure of dG(CTG)4C hairpin and decipher a type I folding geometry of the TGCT tetraloop, wherein the two thymine residues form a T·T loop-closing base pair and the first three loop residues continuously stack. We further reveal that the CTG hairpin can be bound and stabilized by a small-molecule ligand, and the binding interferes with replication of a DNA template containing CTG repeats. Our determined high-resolution structures lay an important foundation for studying molecular interactions between native CTG hairpins and ligands, and benefit drug development for trinucleotide repeat expansion diseases.