Primary biliary cholangitis (PBC) is a chronic autoimmune liver disease caused by intrahepatic bile duct injuries, resulting in fibrosis, cirrhosis, and eventually liver failure. T helper (Th) 17 cells are proposed to involve in the pathogenesis of PBC. However, how and which Th17 cell-derived cytokines affect PBC remains unclear. In this study, we investigated the effects of Th17 effector cytokines, including interleukin (IL)-17A, IL-17F, and IL-21 in PBC using a xenobiotic-induced mouse model of autoimmune cholangitis (inducible chemical xenobiotic models of PBC) treated with cytokine-expressing adeno-associated virus. Our results showed that administration of IL-17A, the well-known main cytokine produced by Th17 cells, did not augment liver inflammation or fibrosis. In contrast, we noted IL-17A-treated mice had lower hepatic Th1 cell numbers and higher hepatic CD11b+Ly6G+ polymorphonuclear myeloid-derived suppressor cell numbers. IL-17F did not alter liver inflammation or fibrosis. However, the administration of IL-21 exacerbated liver inflammatory responses and portal cell infiltration. IL-21 markedly increased the numbers of activated CD8+ T cells and liver tissue-resident memory CD8+ T cells. Moreover, IL-21 aggravates liver fibrosis in mice with autoimmune cholangitis. These results emphasized that not IL-17A but IL-21 in Th17 cell-derived cytokines affected the pathogenesis of PBC. IL-21 enhanced liver inflammation and progression to fibrosis by enhancing the numbers and effector activities of CD8+ T cells. Delineation of the effects of different Th17 effector cytokines in PBC offers clues for developing new therapeutic approaches.