Primary sclerosing cholangitis (PSC) is a chronic inflammatory liver disease and its frequent complication with ulcerative colitis highlights the pathogenic role of epithelial barrier dysfunction. Intestinal barrier dysfunction has been implicated in the pathogenesis of PSC, yet its underlying mechanism remains unknown. Here, we identify Klebsiella pneumonia in the microbiota of patients with PSC and demonstrate that K. pneumoniae disrupts the epithelial barrier to initiate bacterial translocation and liver inflammatory responses. Gnotobiotic mice inoculated with PSC-derived microbiota exhibited T helper 17 (TH17) cell responses in the liver and increased susceptibility to hepatobiliary injuries. Bacterial culture of mesenteric lymph nodes in these mice isolated K. pneumoniae, Proteus mirabilis and Enterococcus gallinarum, which were prevalently detected in patients with PSC. A bacterial-organoid co-culture system visualized the epithelial-damaging effect of PSC-derived K. pneumoniae that was associated with bacterial translocation and susceptibility to TH17-mediated hepatobiliary injuries. We also show that antibiotic treatment ameliorated the TH17 immune response induced by PSC-derived microbiota. These results highlight the role of pathobionts in intestinal barrier dysfunction and liver inflammation, providing insights into therapeutic strategies for PSC.