Expansion of CAG and CTG (CWG) triplet repeats causes several inherited neurological diseases. The CWG repeat diseases are thought to involve complex pathogenic mechanisms through expanded CWG repeat–derived RNAs in a noncoding region and polypeptides in a coding region, respectively. However, an effective therapeutic approach has not been established for the CWG repeat diseases. Here, we show that a CWG repeat DNA–targeting compound, cyclic pyrrole–imidazole polyamide (CWG-cPIP), suppressed the pathogenesis of coding and noncoding CWG repeat diseases. CWG-cPIP bound to the hairpin form of mismatched CWG DNA, interfering with transcription elongation by RNA polymerase through a preferential activity toward repeat-expanded DNA. We found that CWG-cPIP selectively inhibited pathogenic mRNA transcripts from expanded CWG repeats, reducing CUG RNA foci and polyglutamine accumulation in cells from patients with myotonic dystrophy type 1 (DM1) and Huntington’s disease (HD). Treatment with CWG-cPIP ameliorated behavioral deficits in adeno-associated virus–mediated CWG repeat–expressing mice and in a genetic mouse model of HD, without cytotoxicity or off-target effects. Together, we present a candidate compound that targets expanded CWG repeat DNA independently of its genomic location and reduces both pathogenic RNA and protein levels. CWG-cPIP may be used for the treatment of CWG repeat diseases and improvement of clinical outcomes.