It is difficult to directly obtain pathological diagnosis of perihilar cholangiocarcinoma (pCCA). Analysis of bile in the pCCA microenvironment, based on metabolomics and statistical methods, can help in clinical diagnosis. Clinical information, bile samples, blood liver function, blood CA199, CEA, and other indicators were collected from 33 patients with pCCA and 16 patients with gallstones. Bile samples were analyzed using non-targeted metabolomics methods, and a clinical diagnosis model was constructed using multivariate analysis technology. Through Kyoto Encyclopedia of Genes and Genomes (KEGG) enrichment and differential metabolite remodeling, we explored changes in the pCCA pathway and potential therapeutic targets. There were significant differences in patient blood TBIL, ALT, AST, TBA, CA19-9, and CEA indices (p<0.05, |log2(fc)|≥1) between two groups. A significant correlation was found between these different indicators by Spearman's analysis. The clinical parameters were correlated with mass-to-charge ratios of 305 (Positive Ion Mode, POS) and 246 (Negative Ion Mode, NEG) in the metabolic group (| r | ≥ 0.7, P ≤ 10–7). Cross-validation and external validation results showed that the recognition accuracy of the multivariate receiver-operating-characteristic (ROC) discriminant model for pCCA was 0.991 (POS) and 1 (NEG). The differential metabolites significantly affected bile secretion, cofactor biosynthesis, and amino-acid metabolism. Bile metabolomics combined with statistical analysis techniques can be used to accurately diagnose pCCA.