Anthraquinones constitute the largest group of natural quinones, which are used as safe natural dyes and have many pharmaceutical applications. In plants, anthraquinones are biosynthesized through two main routes: the polyketide pathway and the shikimate pathway. The latter primarily forms alizarin-type anthraquinones, and the prenylation of 1,4-dihydroxy-2-naphthoic acid is the first pathway-specific step. However, the prenyltransferase responsible for this key step remains uncharacterized. In this study, the cell suspension culture of Madder (Rubia cordifolia), a plant rich in alizarin-type anthraquinones, was discovered to be capable of prenylating 1,4-dihydroxy-2-naphthoic acid to form 2-carboxyl-3-prenyl-1,4-naphthoquinone and 3-prenyl-1,4-naphthoquinone. Then, a candidate gene belonging to the UbiA superfamily, R. cordifolia dimethylallyltransferase 1 (RcDT1), was shown to account for the prenylation activity. Substrate specificity studies revealed that the recombinant RcDT1 recognized naphthoic acids primarily, followed by 4-hydroxyl benzoic acids. The prenylation activity was strongly inhibited by 1,2- and 1,4-dihydroxynaphthalene. RcDT1 RNA interference significantly reduced the anthraquinones content in R. cordifolia callus cultures, demonstrating that RcDT1 is required for alizarin-type anthraquinones biosynthesis. The plastid localization and root-specific expression further confirmed the participation of RcDT1 in anthraquinone biosynthesis. The phylogenetic analyses of RcDT1 and functional validation of its rubiaceous homologs indicated that DHNA-prenylation activity evolved convergently in Rubiaceae via recruitment from the ubiquinone biosynthetic pathway. Our results demonstrate that RcDT1 catalyzes the first pathway-specific step of alizarin-type anthraquinones biosynthesis in R. cordifolia. These findings will have profound implications for understanding the biosynthetic process of the anthraquinone ring derived from the shikimate pathway.