Cytosine DNA methylation is highly conserved epigenetic modification involved in a wide range of biological processes in eukaryotes. It was established and maintained by cytosine-5 DNA methyltransferases (C5-MTases) in plants. Through genome-wide identification, eight putative SmC5-MTase genes were identified from the genome of Salvia miltiorrhiza, a well-known traditional Chinese medicine material and an emerging model medicinal plant. Based on conserved domains and phylogenetic analysis, eight SmC5-MTase genes were divided into four subfamilies, including MET, CMT, DRM and DNMT2. Genome-wide comparative analysis of the C5-MTase gene family in S. miltiorrhiza and Arabidopsis thaliana, including gene structure, sequence features, sequence alignment and conserved motifs, was carried out. The results showed conservation and divergence of the members of each subfamily in plants. The length of SmC5-MTase open reading frames ranges widely from 1,152 (SmDNMT2) to 5,034 bp (SmMET1). The intron number of SmC5-MTases varies between 7 (SmDRM1) and 20 (SmCMT1 and SmCMT2b). These features were similar to their counterparts from Arabidopsis. Sequence alignment and conserved motif analysis showed the existence of highly conserved and subfamily-specific motifs in the C5-MTases analyzed. Differential transcript abundance was detected for SmC5-MTases, implying genome-wide variance of DNA methylation in different organs and tissues. Transcriptome-wide analysis showed that the transcript levels of all SmC5-MTase genes was slightly changed under yeast extract and methyl jasmonate treatments. Six SmC5-MTases, including SmMET1, SmCMT1, SmCMT2a, SmCMT2b, SmCMT3 and SmDRM1, were salicylic acid-responsive, suggesting the involvement of SmC5-MTases in salicylic acid-dependent immunity. These results provide useful information for demonstrating the role of DNA methylation in bioactive compound biosynthesis and Dao-di herb formation in medicinal plants.