The fungal kingdom potentially has the most complex chitin synthase (CHS) gene family, but evolution of the fungal CHS gene family and its diversification to fulfill multiple functions remain to be elucidated. Here, we identified the full complement of CHSs from 231 fungal species. Using the largest dataset to date, we characterized the evolution of the fungal CHS gene family using phylogenetic and domain structure analysis. Gene duplication, domain recombination and accretion are major mechanisms underlying the diversification of the fungal CHS gene family, producing at least 7 CHS classes. Contraction of the CHS gene family is morphology-specific, with significant loss in unicellular fungi, whereas family expansion is lineage-specific with obvious expansion in early-diverging fungi. ClassV and ClassVII CHSs with the same domain structure were produced by the recruitment of domains PF00063 and PF08766 and subsequent duplications. Comparative analysis of their functions in multiple fungal species shows that the emergence of ClassV and ClassVII CHSs is important for the morphogenesis of filamentous fungi, development of pathogenicity in pathogenic fungi, and heat stress tolerance in Pezizomycotina fungi. This work reveals the evolution of the fungal CHS gene family, and its correlation with fungal morphogenesis and adaptation to ecological niches.