The excavation and utilization of endophytic fungi from medicinal plants is highly important for the development of new drugs. The endophytic fungus Aspergillus tamarii TPD11, which was isolated and obtained by the authors in the previous stage, can produce a variety of polyphyllins with important potential applications in hemostasis, inflammation and antitumor activities; however, the genomic information of TPD11 is still unknown. In this study, we sequenced and assembled the whole genome of the endophytic fungus A. tamarii TPD11, resolved the genome evolutionary relationships of 24 Aspergillus strains, and phylogenetic analysis of the genomes of 16 strains revealed the evolutionary differences between Aspergillus and Penicillium and the mechanisms of genome expansion and contraction. CAZy annotation analysis revealed that TPD11 obtains nutrients mainly by ingesting starch from the host plant. TPD11 has a biosynthesis-related gene cluster for the synthesis of squalestatin S1, and the silencing of this biosynthesis-related gene cluster might increase the content of polyphyllin. Annotation of 11 UDP-glycosyltransferase genes helps to further reveal the biosynthetic pathway of polyphyllin. In addition, secondary metabolism gene cluster and CAZy analyses confirmed the potential probiotic, insecticidal and antimicrobial activities of TPD11 on host plants. This study reveals the intrinsic mechanism by which endophytic fungi increase the content of polyphyllin, which provides a basis for the synthetic synthesis of the natural product polyphyllin.