This paper reviewed the diversity of endophytic fungi and their interactions with medicinal plants, along with the research methodologies utilized to investigate these interactions. It mainly includes the diversity of endophytic fungi, as well as distribution diversity, species diversity, and the diversity of their metabolites and functions, including antibacterial, anti-inflammatory, anti-tumor, insecticidal, antioxidant capabilities, and so on. The research methodologies employed to investigate the interactions between endophytic fungi and medicinal plants are categorized into metagenomics, transcriptomics, metatranscriptomics, proteomics, and metabolomics. Furthermore, this study anticipates the potential applications of secondary metabolites derived from endophytic fungi in both medicine and agriculture.