Polygala crotalarioides, a perennial herbaceous plant found in southwest China, has the potential to be used in the treatment of Alzheimer’s disease. Endophytic fungi that reside within medicinal herbs play an important ecological role in their host plants and can serve as a valuable source for identifying active components. However, little is known about the diversity, and structure of endophytic fungi in P. crotalarioides. In this study, we investigated the community structure and diversity of endophytic fungi in the leaves, stems, and roots of P. crotalarioides at both 1- and 2-year-growth stages using a modern culture-independent method using both culture-independent (high-throughput sequencing, HTS) and culture-based methods. Using HTS, our results revealed that the richness and diversity of endophytic fungi in P. crotalarioides varied depending on the organs and growth stages. Specifically, stems and leaves exhibited significantly higher diversity compared to roots. Additionally, the highest diversity of endophytic fungi was observed in the stems of the 2-year-old plants. At the genus level, Fusarium, Colletotrichum, and Phoma were the most abundant endophytic fungi in 1-year-old samples, while Cercospora, Apiotrichum, and Fusarium were prevalent in 2-year-old samples. A total of 55 endophytic fungal strains belonging to two phyla and 24 genera were isolated from 150 plant tissue segments using culture-based methods. The anti-acetylcholinesterase activity of these isolates was evaluated in vitro and five of them, Phialophora mustea PCAM010, Diaporthe nobilis PCBM027, Fusarium oxysporum LP41, F. oxysporum SR60, and Phoma herbarum SM81, showed strong activity (>50% inhibition rate). These findings will serve as a theoretical basis and practical guide for comprehending the structural composition, biological diversity and bioactivity of endophytic fungi in P. crotalarioides.