Rehmannia piasezkii is a kind of medicinal plants, of the Orobanchaceae family, and well known for its large pink or purple corolla. However, no research on the molecular mechanism of flower color formation in R. piasezkii has been conducted so far. In this study, we investigated the transcriptome of root, stem, leaf and corollas of R. piasezkii using transcriptome sequencing technology and assembled 144,582 unigenes. A total of 58 anthocyanin biosynthetic genes were identified in the R. piasezkii transcriptome, fourteen of which were highly correlated with anthocyanin content, especially RpF3H2, RpDFR2, RpANS1, RpANS2 and RpUFGT. Totally, 35 MYB genes with FPKM values greater than 5 were identified in the R. piasezkii transcriptome, including an R2R3 MYB transcriptional factor RpMYB1, which belongs to subgroup 6 of the R2R3 MYB family. Agrobacterium-mediated transient expression of Nicotiana benthamiana revealed that overexpression of RpMYB1 could activate the expression of structural genes in anthocyanin synthesis pathway and promote the accumulation of anthocyanins in N. benthamiana leaves, indicating that RpMYB1 is a positive regulator of anthocyanin synthesis. Furthermore, combined transient overexpression of RpMYB1 with RpANS1, RpMYB1+RpANS1 with other structural genes all could further enhance the accumulation of anthocyanins in N. benthamiana leaves. Permanent overexpression of RpMYB1 in R. glutinosa promoted anthocyanin accumulation and expression levels of RgCHS, RgF3H, RgDFR and RgANS. Further evidence from dual-luciferase assay suggested that RpMYB1 could bind to the promoter of RpDFR2 and hence activating its expression. These findings provide insight into the molecular regulation in anthocyanin biosynthesis in R. piasezkii and provide valuable genetic resources for the genetic improvement of flower color.