Background: An endophytic fungus lives within a healthy plant during certain stages of, or throughout, its life cycle. Endophytic fungi do not always cause plant disease, and they include fungi that yield different effects, including mutual benefit, and neutral and pathogenic effects. Endophytic fungi promote plant growth, improve the host plant's resistance to biotic and abiotic stresses, and can produce the same or similar biologically active substances as the host. Thus, endophytic fungal products have important implications in drug development. Result: Among the numerous endophytic fungi, we identified two strains, L10Q37 and LQ2F02, that have anti-acetylcholinesterase activity, but the active compound was not huperzine A. The aim of this study was to investigate the anti-acetylcholinesterase activity of secondary metabolites isolated from the endophytic fungi of Huperzia serrata . Microbial cultivation and fermentation were used to obtain secondary metabolites. Active components were then extracted from the secondary metabolites, and their activities were tracked. Two compounds that were isolated from endophytic fungi of H. serrata were identified and had acetylcholine inhibitory activities. In conclusion, endophytic fungal strains were found in H. serrata that had the same anti-acetylcholinesterase activity. Conclusion: We isolated 4 compounds from the endophytic fungus L10Q37, and make sure that there are two new compounds, compounds S1 and S3. And all 6 compounds are new compounds isolated from LQ2F02. From the view there anti acetylcholinesterase activity, S5 is the best, other compounds' anti acetylcholinesterase activity was not good, and compared with huperzine A there are a larger gap.