Terpenoids are the largest class of plant secondary metabolites and have attracted widespread interest. Salvia miltiorrhiza, belonging to the largest and most widely distributed genus in the mint family, is a model medicinal plant with great economic and medicinal value. Diterpenoid tanshinones are the major lipophilic bioactive components in S. miltiorrhiza. Systematic analysis of genes involved in terpenoid biosynthesis has not been reported to date. Searching the recently available working draft of the S. miltiorrhiza genome, 40 terpenoid biosynthesis-related genes were identified, of which 27 are novel. These genes are members of 19 families, which encode all of the enzymes involved in the biosynthesis of the universal isoprene precursor isopentenyl diphosphate and its isomer dimethylallyl diphosphate, and two enzymes associated with the biosynthesis of labdane-related diterpenoids. Through a systematic analysis, it was found that 20 of the 40 genes could be involved in tanshinone biosynthesis. Using a comprehensive approach, the intron/exon structures and expression patterns of all identified genes and their responses to methyl jasmonate treatment were analysed. The conserved domains and phylogenetic relationships among the deduced S. miltiorrhiza proteins and their homologues isolated from other plant species were revealed. It was discovered that some of the key enzymes, such as 1-deoxy-D-xylulose 5-phosphate synthase, 4-hydroxy-3-methylbut-2-enyl diphosphate reductase, hydroxymethylglutaryl-CoA reductase, and geranylgeranyl diphosphate synthase, are encoded by multiple gene members with different expression patterns and subcellular localizations, and both homomeric and heteromeric geranyl diphosphate synthases exist in S. miltiorrhiza. The results suggest the complexity of terpenoid biosynthesis and the existence of metabolic channels for diverse terpenoids in S. miltiorrhiza and provide useful information for improving tanshinone production through genetic engineering.