ABSTRACT Background Researches revealed a close correlation between serum lipid and tumor prognosis. The current study aimed to explore the predictive value of preoperative serum lipid levels for the postoperative prognosis of distal cholangiocarcinoma (dCCA). Methods This study retrospectively included 203 dCCA patients who underwent radical surgery in our department. The Kaplan–Meier method and Cox regression model were used for univariate and multivariate analysis. Six machine‐learning models were used to build a prediction model for postoperative prognosis. Subgroup and correlation analyses were conducted to reveal influencing factors. Results Preoperative high‐density lipoprotein cholesterol (HDL‐c) had the best area under the ROC curve with a cutoff value of 0.415 mmol/L. Overall survival and disease‐free survival were significantly lower in the low HDL‐c group ( p < 0.05). Univariate and multivariate analyses identified HDL‐c ≤ 0.415 mmol/L as an independent risk factor for postoperative tumor recurrence and overall survival. The survival prediction model incorporating HDL‐c constructed by the random forest model exhibited optimal prediction value. Subgroup analysis confirmed HDL‐c ≤ 0.415 mmol/L as an independent risk factor for postoperative tumor recurrence and overall survival in patients with tumor infiltration depth ≥ 12 mm, lymph node metastasis and elevated preoperative CA19‐9. Conclusion HDL‐c ≤ 0.415 mmol/L is an independent risk factor for postoperative prognosis in dCCA patients.