BackgroundMicroalgae are widely considered as multifunctional cell factories that are able to transform the photo-synthetically fixed CO2to numerous high-value compounds, including lipids, carbohydrates, proteins and pigments. However, contamination of the algal mass culture with fungal parasites continues to threaten the production of algal biomass, which dramatically highlights the importance of developing effective measures to control the fungal infection. One viable solution is to identify potential metabolic pathways that are essential for fungal pathogenicity but are not obligate for algal growth, and to use inhibitors targeting such pathways to restrain the infection. However, such targets remain largely unknown, making it challenging to develop effective measures to mitigate the infection in algal mass culture.ResultsIn the present study, we conducted RNA-Seq analysis for the fungusParaphysoderma sedebokerense, which can infect the astaxanthin-producing microalgaHaematococcus pluvialis. It was found that many differentially expressed genes (DEGs) related to folate-mediated one-carbon metabolism (FOCM) were enriched inP. sedebokerense, which was assumed to produce metabolites required for the fungal parasitism. To verify this hypothesis, antifolate that hampered FOCM was applied to the culture systems. Results showed that when 20 ppm of the antifolate co-trimoxazole were added, the infection ratio decreased to ~ 10% after 9 days inoculation (for the control, the infection ratio was 100% after 5 days inoculation). Moreover, application of co-trimoxazole toH. pluvialismono-culture showed no obvious differences in the biomass and pigment accumulation compared with the control, suggesting that this is a potentially algae-safe, fungi-targeted treatment.ConclusionsThis study demonstrated that applying antifolate toH. pluvialisculturing systems can abolish the infection of the fungusP. sedebokerenseand the treatment shows no obvious disturbance to the algal culture, suggesting FOCM is a potential target for antifungal drug design in the microalgal mass culture industry.Supplementary InformationThe online version contains supplementary material available at 10.1186/s13068-023-02353-9.