Dried roots of Salvia miltiorrhiza Bunge have been used in Chinese medicine for over 2000 years for treating cardiovascular disease and improving immunity. The products are favored in Asia, Europe, North America, Africa, and Russia. Consequently, increasing the yield and quality of S. miltiorrhiza has become a major concern worldwide. Here, we conducted a 2-year greenhouse experiment to investigate the effects of applying phosphorus (P) and potassium (K) fertilizers at different growth stages on root growth and production of bioactive compounds in S. miltiorrhiza. The experiment comprised 8 treatments, including 4 each of P and K fertilizers. The P2 treatment greatly enhanced root growth (root length [RL], 43.6 cm; root diameter [RD], 14.4 mm; number of roots [RN], 15.5; shoot dry weight [SDW], 13.82 g per plant; root dry weight [RDW], 15.77 g per plant; and total plant dry weight [TPDW], 29.59 g per plant) and accumulation of bioactive compounds (danshensu [DSS], 0.055%; salvianolic acid B [SAB], 4.50%; cryptotanshione [CTS], 0.056%; tanshinone II A [TSIIA], 0.127%; and total tanshinone [TTS], 0.226%) compared to the other P treatments. The K4 treatment showed improved root growth (RL, 45.9 cm; RD, 11.2 mm; RN, 17.8; SDW, 14.96 g per plant; RDW, 16.80 g per plant; and TPDW, 31.76 g per plant) and bioactive compound accumulation (DSS, 0.52% and SAB, 4.13%) compared to the other K treatments. Conversely, a negative effect was observed in the accumulation of CTS (0.039%), TSIIA (0.055%), and TTS (0.139%). Significantly increased concentrations of CTS (0.052%), TSIIA (0.114%), and TTS (0.213%) were observed in the K1 treatment compared to the other K treatments. The total DSS, SAB, CTS, TSIIA, and TTS yields were, respectively, the highest in the P2 treatment at 8.61, 709.3, 8.87, 19.98, 35.68 mg per plant, and the K4 treatment at 8.41, 693.2, 6.49, 9.18, and 23.42 mg per plant. Further, they were, respectively, the lowest in the P4 treatment at 2.78, 169.7, 1.96, 3.59, and 7.48 mg per plant, and the K3 treatment at 2.95, 194.5, 2.61, 5.08, and 10.17 mg per plant.