Salvia miltiorrhiza Bunge is an important herb for the treatment of cerebrovascular and cardiovascular diseases with bioactive compounds (phenolic acids and tanshinones). Abundant studies showed that tanshinones could be stimulated by biotic and abiotic stresses, but limited information is available on biosynthesis of phenolic acids promoted by biotic stresses. The aim of the present work was to isolate and identify rhizosphere bacteria which stimulated phenolic compound in Salvia miltiorrhiza hairy roots and investigated the internal mechanism, providing a potential means to enhance content of pharmaceuticals in S. miltiorrhiza. The results showed that six bacteria, namely, HYR1, HYR26, SCR22, 14DSR23, DS6, and LNHR13, belonging to the genus Pseudomonas and Pantoea, significantly promoted the growth and content of major phenolic acids, RA and SAB. Bacteria LNHR13 was the most effective one, with the contents of RA and SAB reaching ∼2.5‐fold (30.1 mg/g DW) and ∼2.3‐fold (48.3 mg/g DW) as those of the control, respectively. Phytohormones and polysaccharides produced by bacteria showed potential responsibility for the growth and biosynthesis of secondary metabolites of S. miltiorrhiza. Meanwhile, we found that the more abundant the types and contents of phytohormones, the stronger their stimulating effect on the content of salvianolic acids.