Endophytic fungi are often embedded in their host's metabolic networks, which can result in alterations of metabolite production and higher amounts of active compounds in medicinal plants. This study reports the occurrence, diversity, and secondary metabolite profiles of endophytic fungi isolated from Salvia abrotanoides plants obtained from three geographically distinct sites in Iran. A total of 56 endophytic fungi were isolated from roots and leaves of S. abrotanoides; site-specificity and root-dominated colonization was found to be a general characteristic of the endophytes. Based on molecular identification, the endophytic fungi were classified into 15 genera. Mycelial extracts of these isolates were subjected to high-resolution mass spectrometry analyses and revealed a broad spectrum of secondary metabolites. Our results demonstrated that Penicillium canescens, P. murcianum, Paraphoma radicina, and Coniolariella hispanica are producers of cryptotanshinone, which is a main bioactive compound of S. abrotanoides. Moreover, it was shown that it can be produced independent of the host plant. The effect of exogenous gibberellin on S. abrotanoides and endophytic fungi was shown to have a positive effect on increasing the cryptotanshinone production in the plant as well as in endophytic fungi cultivated under axenic conditions. Our findings provide further evidence that endophytic fungi play an important role in the production plant bioactive metabolites. Moreover, they provide an exploitable basis to increase cryptotanshinone production in S. abrotanoides.