This study aimed to predict the probability of grade ≥2 pneumonitis or dyspnea within 12 months of receiving conventionally fractionated or mildly hypofractionated proton beam therapy for locally advanced lung cancer using machine learning. Demographic and treatment characteristics were analyzed for 965 consecutive patients treated for lung cancer with conventionally fractionated or mildly hypofractionated (2.2-3 Gy/fraction) proton beam therapy across 12 institutions. Three machine learning models (gradient boosting, additive tree, and logistic regression with lasso regularization) were implemented to predict Common Terminology Criteria for Adverse Events version 4 grade ≥2 pulmonary toxicities using double 10-fold cross-validation for parameter hyper-tuning without leak of information. Balanced accuracy and area under the curve were calculated, and 95% confidence intervals were obtained using bootstrap sampling. The median age of the patients was 70 years (range, 20-97), and they had predominantly stage IIIA or IIIB disease. They received a median dose of 60 Gy in 2 Gy/fraction, and 46.4% received concurrent chemotherapy. In total, 250 (25.9%) had grade ≥2 pulmonary toxicity. The probability of pulmonary toxicity was 0.08 for patients treated with pencil beam scanning and 0.34 for those treated with other techniques (P = 8.97e-13). Use of abdominal compression and breath hold were highly significant predictors of less toxicity (P = 2.88e-08). Higher total radiation delivered dose (P = .0182) and higher average dose to the ipsilateral lung (P = .0035) increased the likelihood of pulmonary toxicities. The gradient boosting model performed the best of the models tested, and when demographic and dosimetric features were combined, the area under the curve and balanced accuracy were 0.75 ± 0.02 and 0.67 ± 0.02, respectively. After analyzing performance versus the number of data points used for training, we observed that accuracy was limited by the number of observations. In the largest analysis of prospectively enrolled patients with lung cancer assessing pulmonary toxicities from proton therapy to date, advanced machine learning methods revealed that pencil beam scanning, abdominal compression, and lower normal lung doses can lead to significantly lower probability of developing grade ≥2 pneumonitis or dyspnea.