Th17 cells are involved in the pathogenesis of IBD. The pathogenesis of IBD is characterized by gut microbes imbalance, mucosal damage, inflammation and fibrosis. In the normal intestinal microecosystem, Th17 cells and Tregs are in dynamic balance. IL-17 secreted by Th17 cells inhibits the colonization of pathogenic bacteria by targeting IECs that enhance the secretion of IgA and antimicrobial peptides, while Tregs inhibit excessive immunity of T cells. Under the influence of external stimuli and susceptibility genes, imbalances in gut microbiota lead to a decrease in SCFA-producing bacteria, including R.intestinalis, and an increase in pathogenic bacteria, including SFB. DCs are activated to produce cytokines such as IL-6, IL-23, and TGF-β. Th17 cells migrate by CCL20 secreted by IECs to the site of inflammation, where they activate and secrete a large number of cytokines to participate in the progression of inflammation. At the same time, IL-17 induces IECs to express IL-8, which recruits a large number of neutrophils and NETs at sites of inflammation, positively regulating Th17 cell feedback. IL-21 is involved in the regulation of Th17 cell differentiation in an autocrine manner. IL-22 secretion by Th17 cells was shown to act on NK cells and goblet cells and promote goblet cell mucus production. With the continuous progression of inflammation, IL-17 can induce fibroblasts to secrete ECM and promote the progression of intestinal fibrosis. R.intestinalis, Roseburia intestinalis; NETs, neutrophil extracellular traps; ECM, extracellular matrix.