ImportanceThe association between body composition (BC) and cancer outcomes is complex and incompletely understood. Previous research in non–small-cell lung cancer (NSCLC) has been limited to small, single-institution studies and yielded promising, albeit heterogeneous, results.ObjectivesTo evaluate the association of BC with oncologic outcomes in patients receiving immunotherapy for advanced or metastatic NSCLC.Design, Setting, and ParticipantsThis comprehensive multicohort analysis included clinical data from cohorts receiving treatment at the Dana-Farber Brigham Cancer Center (DFBCC) who received immunotherapy given alone or in combination with chemotherapy and prospectively collected data from the phase 1/2 Study 1108 and the chemotherapy arm of the phase 3 MYSTIC trial. Baseline and follow-up computed tomography (CT) scans were collected and analyzed using deep neural networks for automatic L3 slice selection and body compartment segmentation (skeletal muscle [SM], subcutaneous adipose tissue [SAT], and visceral adipose tissue). Outcomes were compared based on baseline BC measures or their change at the first follow-up scan. The data were analyzed between July 2022 and April 2023.Main Outcomes and MeasuresHazard ratios (HRs) for the association of BC measurements with overall survival (OS) and progression-free survival (PFS).ResultsA total of 1791 patients (878 women [49%]) with NSCLC were analyzed, of whom 487 (27.2%) received chemoimmunotherapy at DFBCC (DFBCC-CIO), 825 (46.1%) received ICI monotherapy at DFBCC (DFBCC-IO), 222 (12.4%) were treated with durvalumab monotherapy on Study 1108, and 257 (14.3%) were treated with chemotherapy on MYSTIC; median (IQR) ages were 65 (58-74), 66 (57-71), 65 (26-87), and 63 (30-84) years, respectively. A loss in SM mass, as indicated by a change in the L3 SM area, was associated with worse oncologic outcome across patient groups (HR, 0.59 [95% CI, 0.43-0.81] and 0.61 [95% CI, 0.47-0.79] for OS and PFS, respectively, in DFBCC-CIO; HR, 0.74 [95% CI, 0.60-0.91] for OS in DFBCC-IO; HR, 0.46 [95% CI, 0.33-0.64] and 0.47 [95% CI, 0.34-0.64] for OS and PFS, respectively, in Study 1108; HR, 0.76 [95% CI, 0.61-0.96] for PFS in the MYSTIC trial). This association was most prominent among male patients, with a nonsignificant association among female patients in the MYSTIC trial and DFBCC-CIO cohorts on Kaplan-Meier analysis. An increase of more than 5% in SAT density, as quantified by the average CT attenuation in Hounsfield units of the SAT compartment, was associated with poorer OS in 3 patient cohorts (HR, 0.61 [95% CI, 0.43-0.86] for DFBCC-CIO; HR, 0.62 [95% CI, 0.49-0.79] for DFBCC-IO; and HR, 0.56 [95% CI, 0.40-0.77] for Study 1108). The change in SAT density was also associated with PFS for DFBCC-CIO (HR, 0.73; 95% CI, 0.54-0.97). This was primarily observed in female patients on Kaplan-Meier analysis.Conclusions and RelevanceThe results of this multicohort study suggest that loss in SM mass during systemic therapy for NSCLC is a marker of poor outcomes, especially in male patients. SAT density changes are also associated with prognosis, particularly in female patients. Automated CT-derived BC measurements should be considered in determining NSCLC prognosis.