Both radiotherapy (RT) and immune checkpoint inhibitors (ICIs) may induce pneumonitis which is difficult to distinguish clinically. We tested the utility of computed tomography (CT) in identifying the cause of pneumonitis in patients with non-small cell lung cancer (NSCLC) who received RT, ICIs and RT combined with ICIs (RT+ICIs). In this study, we analyzed the clinical characteristics and CT morphology of 130 NSCLC patients who developed pneumonitis after receipt of ICIs only (n = 50), thoracic RT only (n = 50) (ICIs only + RT only, the training cohort, n = 100), and RT+ICIs (the test cohort, n = 30). CT radiomics features were extracted using 3D-Slicer software and selected using LASSO regression for training a random forest (RF) classifier and a linear discriminant analysis (LDA) classifier to discern pneumonitis etiology. Patients who received RT or ICIs only were defined as the training cohort since the cause of their pneumonitis was readily identifiable. Patients who received RT+ICIs were defined as the test cohort and the cause of their pneumonitis were determined by clinicians as the ground truth. In the study, the median time from the initiation of treatment to pneumonitis was 1.9 months in RT+ICIs patients, which was shorter than 2.5 months in RT only and 2.7 months in ICIs only patients. In addition, the patients in RT+ICIs group have more high grade (grade 3-4) pneumonitis compared to patients in ICIs only or RT only group (p<0.05). Pneumonitis after the combined therapy was not a simple superposition mode of RP and CIP, resulting in the distinct characteristics of both RT and ICIs-related pneumonitis. (1) Some cases resembled RP with sharp borders in the ipsilateral lung and others resembled the bilateral distribution of typical CIP, while some patients exhibit an intermediate morphology; (2) Some pneumonitis occurred in the areas of low and medium doses of radiation rather than the high-dose radiation areas similar to RP; (3) Some pneumonitis was initially limited to the ipsilateral lung that had received radiation and then developed in bilateral lungs. The RF classifier showed favorable discrimination between CIP and RP with an area under the receiver operating curve (AUC) of 0.859 (95% CI: 0.7884-0.9292) in the training cohort and 0.851 (95% CI: 0.6998-1) in the test cohort. The simplified LDA classifier consisting of 7 LASSO-selected features achieved an AUC of 0.881 (95% CI: 0.815-0.947) in the training cohort and 0.842 (95% CI: 0.686-0.997) in the test cohort. RT and ICIs-related pneumonitis exhibit distinct clinical characteristics and morphologic features on CT. CT radiomics-based classifiers could provide a noninvasive method to identify the predominant etiology in NSCLC patients who developed pneumonitis after thoracic RT and ICIs.