BACKGROUND: Postoperative pulmonary infections (POPIs) occur in approximately 13-38% of patients who undergo surgery for esophageal cancer, negatively impacting patient outcomes and prolonging hospital stays. This study aims to develop a novel clinical prediction model to identify patients at risk for POPIs early, thereby enabling timely intervention by clinicians. METHODS: This study included 910 patients from two hospitals. Of these, 795 patients from one hospital were randomly assigned to the training cohort (n = 556) and the validation cohort (n = 239) at a 7:3 ratio. The external test cohort consisted of 115 patients from the second hospital. A nomogram was developed via logistic regression to predict the incidence of POPIs. The model's discrimination, precision and clinical benefit were evaluated by constructing a receiver operating characteristic (ROC) curve, calculating the area under the ROC curve (AUC), performing a calibration plot, conducting decision curve analysis (DCA) and clinical impact curves (CIC). RESULTS: Multivariate logistic regression revealed that age, anemia, neoadjuvant therapy, T stage, thoracic adhesions and duration of surgery were independent risk factors for POPIs. The AUC for the training cohort was 0.8095 (95% CI: 0.7664-0.8527), that for the validation cohort was 0.8039 (95% CI: 0.7436-0.8643), and that for the external test cohort was 0.7174 (95% CI: 0.6145-0.8204). Calibration plots demonstrated good agreement between the predicted and observed probabilities, while DCA and CIC demonstrated good clinical applicability of the model in three cohorts. CONCLUSION: The nomogram, which incorporates six key factors, effectively predicts the risk of POPIs and can serve as a valuable tool for clinicians in identifying high-risk patients.