BACKGROUND: The International Study Group of Pancreatic Surgery has established the definition and grading system for postpancreatectomy acute pancreatitis (PPAP). There are no established machine learning models for predicting PPAP following pancreaticoduodenectomy (PD). AIM: To explore the predictive model of PPAP, and test its predictive efficacy to guide the clinical work. METHODS: Clinical data from consecutive patients who underwent PD between 2016 and 2024 were retrospectively collected. An analysis of PPAP risk factors was performed, various machine learning algorithms [logistic regression, random forest, gradient boosting decision tree, extreme gradient boosting, light gradient boosting machine, and category boosting (CatBoost)] were utilized to develop predictive models. Recursive feature elimination was employed to select several variables to achieve the optimal machine algorithm. RESULTS: The study included 381 patients, of whom 88 (23.09%) developed PPAP. PPAP patients exhibited a significantly higher incidence of postoperative pancreatic fistula (55.68% CONCLUSION: We developed the first machine learning-based predictive model for PPAP following PD. This predictive model can assist surgeons in anticipating and managing this complication proactively.