The plant mycobiome plays a crucial role in the host life cycle, influencing both healthy and diseased states, and is essential for plant tolerance to drought. In this study, we used ITS metabarcoding to investigate the fungal community of the drought-resistant plant Malva sylvestris L. in Morocco along a gradient of precipitation, encompassing subhumid and semi-arid environments. We sampled three biotopes: rhizosphere, bulk soil, and root endosphere. Our findings revealed an absence of beta-diversity differences between bulk soil and rhizosphere, indicating that the plant does not selectively influence its rhizosphere mycobiome. Additionally, ASVs belonging to the genus Alternaria represented up to 30% of reads in the plant’s roots and correlated with drought (p = 0.006), indicating a potential role for this fungal genus in mitigating drought, possibly as part of the dark septate endophyte group. Root staining and microscopic observation revealed extensive colonization by fungal hyphae and microsclerotia-like structures. Furthermore, ASVs identified as Fusarium equiseti were also correlated with low precipitation and recognized as a hub taxon in the roots. However, it remains uncertain whether this species is pathogenic or beneficial to the plant. These insights contribute to our understanding of the plant mycobiome’s role in drought tolerance and highlight the importance of specific fungal taxa in supporting plant health under varying environmental conditions. Future research should focus on characterizing these taxa’s functional roles and their interactions with the host plant to further elucidate their contributions to drought resistance.