Rationale: Accurate diagnosis is crucial for predicting interstitial lung disease (ILD) progression and guiding treatment strategies. Surgical lung biopsy (SLB) has a high complication risk. Models for predicting post-SLB complications are lacking.Objectives: This multicenter study investigated high post-surgical lung biopsy complication risk factors and constructed a machine-learning model for predicting such events in patients with ILD.Methods: We retrospectively analyzed data from 302 patients who underwent SLB at five Chinese centers between January 2012 and July 2024. For feature selection, we combined multivariate analysis, least absolute shrinkage selection operator regression, and Random Forest out-of-bag error evaluation. Eight machine-learning algorithms were used for modeling. GridSearchCV was used for five-fold cross-validation for parameter optimization. Model performance was evaluated based on accuracy, precision, recall, F1-score, and area under the ROC curve (AUC) with 95%.Measurements and Main Results: Final ILD subtypes included nonspecific interstitial pneumonia, idiopathic pulmonary fibrosis, hypersensitivity pneumonitis, connective tissue disease–related ILD, sarcoidosis, unclassifiable ILD, and others; diagnoses were assigned by multidisciplinary discussion integrating clinical, HRCT, and histopathology. Of 302 included patients, 32.5% experienced serious adverse events. The cohort was split into a training set (n=127) and a test set (n=85); an external validation cohort (n=90) was drawn from two additional centers. Increased age, high smoking index, elevated Charlson Comorbidity Index, decreased forced vital capacity and diffusing capacity of the lungs for carbon monoxide, higher Quantitative Lung Fibrosis score, and long-term immunosuppressant use were independent predictors. The eXtreme Gradient Boosting algorithm performed best (accuracy: 0.92, test AUC: 0.88 [95% CI: 0.782-0.978]). External validation AUC was 0.86 [95% CI: 0.762-0.958], revealing model stability.Conclusion: We identified predictors of serious post-SLB complications in patients with ILD. The eXtreme Gradient Boosting model was accurate and reliable, as verified by decision curve analysis and external validation. This multicenter setting and external validation support potential clinical utility for pre-operative risk assessment