Our study found that except Novosphingobium resinovorum (B5) Salvia miltiorrhiza root endophytic bacteria Pseudomonas brassicacearum sub sp. neoaurantiaca (B1), Rhizobium radiobacter (B2), Pseudomonas thivervalensis (B3), Pseudomonas frederiksbergensis (B4) significantly improved the activity of key enzymes 3-hydroxy-3-methyglutary1-CoA reductase and 1-deoxy-D-xylulose-5-phosphate synthase in the biosynthetic pathway of tanshinones. Specifically, HMGR activity with B1 treatment increased 2.1-fold that of control, 1-deoxy-Dxylulose-5-phosphate synthase activity with B2 treatment increased 5.0-fold that of control, which caused a significant increase in tanshinone content in the hairy roots. The dihydrotanshinone I and cryptotanshinone content under B1 treatment increased 19.2-fold and 11.3-fold, respectively, and total tanshinone content increased 3.7-fold that of control. The five endophytic bacteria B1, B2, B3, B4 and B5 all significantly decreased phenylalanine ammonialyase and tyrosine aminotransferase activity in hairy roots, of which, B3 treatment decreased phenylalanine ammonialyase activity by 46.2 %, and B2 treatment decreased tyrosine aminotransferase activity by 44.7 % compared with the control. Each of the five endophytic bacteria decomposed rosmarinic acid and salvianolic acid B, which caused a significant decrease in rosmarinic acid and salvianolic acid B content in hairy roots, with B2 treatment decreasing rosmarinic acid and salvianolic acid B content by 94.5 and 89.0 %, respectively, compared with the control. The five endophytic bacteria also inhibited the growth of S. miltiorrhiza hairy roots, of which, B2 and B4 treatment decreased hairy root biomass by 55.2 and 51.3 %, respectively, compared with the control, while hairy roots promoted the growth of B4 and B5 and inhibited the growth of B1 and B3.