<b>Background:</b> We performed a systematic review and meta-analysis to evaluate the risk of pneumonitis and pneumonia associated with immune checkpoint inhibitors (ICIs) for solid tumors. <b>Methods:</b> The following keywords were used in searching the Embase and PubMed database: pneumonitis, pneumonia, and immune checkpoint inhibitors. The data was analyzed by using the R software and Metafor package. <b>Results:</b> Among 3,436 studies, 23 randomized clinical trials (RCTs) met our selection criteria which included data from <b>12,876</b> patients. Compared with chemotherapy, PD-1 inhibitors showed significant increase in grade 1-5 and grade 3-5 pneumonitis (RR, 5.17, 95% CI: 2.82-9.47, <i>p</i> < 0.001; RR, 4.14, 95% CI: 1.82-9.42, <i>p</i> < 0.001), but not in pneumonia. PD-L1 inhibitors showed significant increase in grade 1-5 pneumonitis and pneumonia (RR, 3.25, 95% CI: 1.61-6.57, <i>p</i> < 0.001; RR, 2.11, 95% CI: 1.20-3.70, <i>p</i> < 0.001). There was no significant difference in any grade pneumonitis and pneumonia in cytotoxic T lymphocyte-associated protein 4 (<em>CTLA4</em>) inhibitors subgroup. Programmed cell death protein 1 (PD-1) inhibitor (nivolumab and pembrolizumab) both showed significant increase in grade 1-5 pneumonitis, and pembrolizumab specially tended to increase grade 3-5 pneumonitis. (RR, 5.64 95% CI: 1.94-16.38, <i>p</i> < 0.001). Compared with PD-1 inhibitor (nivolumab) or CTLA-4 inhibitor (ipilimumab) monotherapy, PD-1 inhibitor, and CTLA-4 inhibitor (nivolumab plus ipilimumab) combination therapies showed significant increase in grade 1-5 and grade 3-5 pneumonitis (RR 3.47, 95%CI:1.76-6.83, <i>p</i> < 0.001; RR 3.48, 95%CI: 1.10-11.02, <i>p</i> < 0.001). <b>Conclusions:</b> PD-1/PD-L1 inhibitors treatment could increase the risk of all-grade pneumonitis. <em>CTLA4</em> inhibitor ipilimumab treatment alone could not increase the risk of pneumonitis but could augment the risk of pneumonitis in PD-1/PD-L1 inhibitor treated patients. There was no significant increase in the risk of pneumonia after either PD-1/PDL-1inhibitor or <em>CTLA4</em> inhibitor treatment alone or in combination.