Survival and growth of the anaerobic gut fungi (AGF; Neocallimastigomycota) in the herbivorous gut necessitate the possession of multiple abilities absent in other fungal lineages. We hypothesized that horizontal gene transfer (HGT) was instrumental in forging the evolution of AGF into a phylogenetically distinct gut-dwelling fungal lineage. The patterns of HGT were evaluated in the transcriptomes of 27 AGF strains, 22 of which were isolated and sequenced in this study, and 4 AGF genomes broadly covering the breadth of AGF diversity. We identified 277 distinct incidents of HGT in AGF transcriptomes, with subsequent gene duplication resulting in an HGT frequency of 2 to 3.5% in AGF genomes. The majority of HGT events were AGF specific (91.7%) and wide (70.8%), indicating their occurrence at early stages of AGF evolution. The acquired genes allowed AGF to expand their substrate utilization range, provided new venues for electron disposal, augmented their biosynthetic capabilities, and facilitated their adaptation to anaerobiosis. The majority of donors were anaerobic fermentative bacteria prevalent in the herbivorous gut. This study strongly indicates that HGT indispensably forged the evolution of AGF as a distinct fungal phylum and provides a unique example of the role of HGT in shaping the evolution of a high-rank taxonomic eukaryotic lineage.IMPORTANCE The anaerobic gut fungi (AGF) represent a distinct basal phylum lineage (Neocallimastigomycota) commonly encountered in the rumen and alimentary tracts of herbivores. Survival and growth of anaerobic gut fungi in these anaerobic, eutrophic, and prokaryote-dominated habitats necessitates the acquisition of several traits absent in other fungal lineages. We assess here the role of horizontal gene transfer as a relatively fast mechanism for trait acquisition by the Neocallimastigomycota postsequestration in the herbivorous gut. Analysis of 27 transcriptomes that represent the broad diversity of Neocallimastigomycota identified 277 distinct HGT events, with subsequent gene duplication resulting in an HGT frequency of 2 to 3.5% in AGF genomes. These HGT events have allowed AGF to survive in the herbivorous gut by expanding their substrate utilization range, augmenting their biosynthetic pathway, providing new routes for electron disposal by expanding fermentative capacities, and facilitating their adaptation to anaerobiosis. HGT in the AGF is also shown to be mainly a cross-kingdom affair, with the majority of donors belonging to the bacteria. This study represents a unique example of the role of HGT in shaping the evolution of a high-rank taxonomic eukaryotic lineage.