Flavonoids are a class of important secondary metabolites with a broad spectrum of pharmacological functions. Salvia miltiorrhiza Bunge (Danshen) is a well-known traditional Chinese medicinal herb with a broad diversity of flavonoids. However, flavonoid biosynthetic enzyme genes have not been systematically and comprehensively analyzed in S. miltiorrhiza. Through genome-wide prediction and molecular cloning, twenty six flavonoid biosynthesis-related gene candidates were identified, of which twenty are novel. They belong to nine families potentially encoding chalcone synthase (CHS), chalcone isomerase (CHI), flavone synthase (FNS), flavanone 3-hydroxylase (F3H), flavonoid 3′-hydroxylase (F3′H), flavonoid 3′,5′-hydroxylase (F3′5′H), flavonol synthase (FLS), dihydroflavonol 4-reductase (DFR), and anthocyanidin synthase (ANS), respectively. Analysis of intron/exon structures, features of deduced proteins and phylogenetic relationships revealed the conservation and divergence of S. miltiorrhiza flavonoid biosynthesis-related proteins and their homologs from other plant species. These genes showed tissue-specific expression patterns and differentially responded to MeJA treatment. Through comprehensive and systematic analysis, fourteen genes most likely to encode flavonoid biosynthetic enzymes were identified. The results provide valuable information for understanding the biosynthetic pathway of flavonoids in medicinal plants.