Huperzine A (HupA), a naturally occurring lycopodium alkaloid, is a potent, highly specific and reversible inhibitor of acetylcholinesterase and is a potential treatment for Alzheimer's disease. However, isolating HupA from Huperziaceae plants is inefficient; thus, extracting this compound from endophytic fungi may be more controllable and sustainable. However, the large-scale production of this chemical from endophytes is limited by the innate instability of endophytic fungi. In this study, we maintained the stability and viability of the HupA-producing endophytic fungus Shiraia sp. Slf14 and enhanced the HupA titers during fermentation by adding Huperzia serrata extracts (HSE), L-lysine, and acetic acid into the culture as inducers. Adding trace amounts of HupA clearly improved the HupA production of Shiraia sp. Slf14, reaching a maximum content of approximately 40 μg g(-1). Moreover, the addition of HSE and L-lysine promoted HupA production in the flask fermentation. The aforementioned bioprocessing strategy may be potentially applied to other endophytic fungal culture systems for the efficient production of plant secondary metabolites.