Salvia miltiorrhiza holds significant importance in traditional Chinese medicine. Stress-associated proteins (SAP), identified by A20/AN1 zinc finger structural domains, play crucial roles in regulating plant growth, development, resistance to biotic and abiotic stress, and hormone responses. Herein, we conducted a genome-wide identification of the SAP gene family in S. miltiorrhiza. The expression analysis revealed a significant upregulation of SmSAP4 under methyljasmonate (MeJA) and salt stress. Overexpressing SmSAP4 in S. miltiorrhiza hairy roots increased tanshinones content while decreasing salvianolic acids content, while RNAi-silencing SmSAP4 had the opposite effect. SmSAP4 overexpression in both Arabidopsis thaliana and S. miltiorrhiza hairy roots decreased their salt stress tolerance, accompanied by increased activities of superoxide dismutase (SOD), peroxidase (POD), and catalase (CAT), and a hindered ability to maintain the Na+ : K+ ratio. Further investigations demonstrated that MeJA alleviated the inhibitory effect of SmJAZ3 on SmSAP4 activation by SmbHLH37 and SmERF73. However, MeJA did not affect the inhibition of SmSAP4 activation by SmJAZ8 through SmbHLH37. In summary, our research reveals that SmSAP4 negatively regulates the accumulation of salvianic acid through the SmJAZs-SmbHLH37/SmERF73-SmSAP4 module and positively impacting the accumulation of tanshinones. Additionally, it functions as a negative regulator under salt stress.