Importance: Many patients with advanced non-small cell lung cancer (NSCLC) receiving immunotherapy show primary resistance. High-dose radiotherapy can lead to increased tumor antigen release, improved antigen presentation, and T-cell infiltration. This radiotherapy may enhance the effects of checkpoint inhibition. Objective: To assess whether stereotactic body radiotherapy on a single tumor site preceding pembrolizumab treatment enhances tumor response in patients with metastatic NSCLC. Design, Setting, and Participants: Multicenter, randomized phase 2 study (PEMBRO-RT) of 92 patients with advanced NSCLC enrolled between July 1, 2015, and March 31, 2018, regardless of programmed death-ligand 1 (PD-L1) status. Data analysis was of the intention-to-treat population. Interventions: Pembrolizumab (200 mg/kg every 3 weeks) either alone (control arm) or after radiotherapy (3 doses of 8 Gy) (experimental arm) to a single tumor site until confirmed radiographic progression, unacceptable toxic effects, investigator decision, patient withdrawal of consent, or a maximum of 24 months. Main Outcomes and Measures: Improvement in overall response rate (ORR) at 12 weeks from 20% in the control arm to 50% in the experimental arm with P <.10. Results: Of the 92 patients enrolled, 76 were randomized to the control arm (n = 40) or the experimental arm (n = 36). Of those, the median age was 62 years (range, 35-78 years), and 44 (58%) were men. The ORR at 12 weeks was 18% in the control arm vs 36% in the experimental arm (P =.07). Median progression-free survival was 1.9 months (95% CI, 1.7-6.9 months) vs 6.6 months (95% CI, 4.0-14.6 months) (hazard ratio, 0.71; 95% CI, 0.42-1.18; P =.19), and median overall survival was 7.6 months (95% CI, 6.0-13.9 months) vs 15.9 months (95% CI, 7.1 months to not reached) (hazard ratio, 0.66; 95% CI, 0.37-1.18; P =.16). Subgroup analyses showed the largest benefit from the addition of radiotherapy in patients with PD-L1-negative tumors. No increase in treatment-related toxic effects was observed in the experimental arm. Conclusions and Relevance: Stereotactic body radiotherapy prior to pembrolizumab was well tolerated. Although a doubling of ORR was observed, the results did not meet the study's prespecified end point criteria for meaningful clinical benefit. Positive results were largely influenced by the PD-L1-negative subgroup, which had significantly improved progression-free survival and overall survival. These results suggest that a larger trial is necessary to determine whether radiotherapy may activate noninflamed NSCLC toward a more inflamed tumor microenvironment. Trial Registration: ClinicalTrials.gov identifier: NCT02492568.