Thermomyces dupontii, a widely distributed thermophilic fungus, is an ideal organism for investigating the mechanism of thermophilic fungal adaptation to diverse environments. However, genetic analysis of this fungus is hindered by a lack of available and efficient gene-manipulating tools. In this study, two different Cas9 proteins from mesophilic and thermophilic bacteria, with in vivo expression of a single guide RNA (sgRNA) under the control of tRNAGly, were successfully adapted for genome editing in T. dupontii We demonstrated the feasibility of applying these two gene editing systems to edit one or two genes in T. dupontii The mesophilic CRISPR/Cas9 system displayed higher editing efficiency (50 to 86%) than the thermophilic CRISPR/Cas9 system (40 to 67%). However, the thermophilic CRISPR/Cas9 system was much less time-consuming than the mesophilic CRISPR/Cas9 system. Combining the CRISPR/Cas9 systems with homologous recombination, a constitutive promoter was precisely knocked in to activate a silent polyketide synthase-nonribosomal peptide synthase (PKS-NRPS) biosynthetic gene, leading to the production of extra metabolites that did not exist in the parental strains. Metabolic analysis of the generated biosynthetic gene mutants suggested that a key biosynthetic pathway existed for the biosynthesis of thermolides in T. dupontii, with the last two steps being different from those in the heterologous host Aspergillus Further analysis suggested that these biosynthetic genes might be involved in fungal mycelial growth, conidiation, and spore germination, as well as in fungal adaptation to osmotic, oxidative, and cell wall-perturbing agents.IMPORTANCE Thermomyces represents a unique ecological taxon in fungi, but a lack of flexible genetic tools has greatly hampered the study of gene function in this taxon. The biosynthesis of potent nematicidal thermolides in T. dupontii remains largely unknown. In this study, mesophilic and thermophilic CRISPR/Cas9 gene editing systems were successfully established for both disrupting and activating genes in T. dupontii In this study, a usable thermophilic CRISPR/Cas9 gene editing system derived from bacteria was constructed in thermophilic fungi. Chemical analysis of the mutants generated by these two gene editing systems identified the key biosynthetic genes and pathway for the biosynthesis of nematocidal thermolides in T. dupontii Phenotype analysis and chemical stress experiments revealed potential roles of secondary metabolites or their biosynthetic genes in fungal development and adaption to chemical stress conditions. These two genomic editing systems will not only accelerate investigations into the biosynthetic mechanisms of unique natural products and functions of cryptic genes in T. dupontii but also offer an example for setting up CRISPR/Cas9 systems in other thermophilic fungi.