Importance: Whether immune-related adverse events (irAEs) indicate drug activity in patients treated with immune checkpoint inhibitors remains unknown. Objective: To investigate the association between irAEs and recurrence-free survival (RFS) in the double-blind EORTC 1325/KEYNOTE-054 clinical trial comparing pembrolizumab therapy and placebo for the treatment of patients with high-risk stage III melanoma. Design, Setting, and Participants: A total of 1019 adults with stage III melanoma were randomly assigned on a 1:1 ratio to receive treatment with pembrolizumab therapy or placebo. Eligible patients were adults 18 years and older with complete resection of cutaneous melanoma metastatic to lymph nodes, classified with stage IIIA (at least 1 micrometastasis measuring >1 mm in greatest diameter), IIIB, or IIIC (without in-transit metastasis) cancer. Patients were randomized from August 26, 2015, to November 14, 2016. The clinical cutoff for the data set was October 2, 2017. Analyses were then performed on the database, which was locked on November 28, 2017. Interventions: Participants were scheduled to receive 200 mg of pembrolizumab or placebo every 3 weeks for a total of 18 doses for approximately 1 year or until disease recurrence, unacceptable toxic effects, major protocol violation, or withdrawal of consent. Main Outcomes and Measures: The association between irAEs and RFS was estimated using a Cox model adjusted for sex, age, and AJCC-7 stage, with a time-varying covariate that had a value of 0 before irAE onset and 1 after irAE onset. Results: Of 1011 patients who began treatment with pembrolizumab therapy or placebo, 622 (61.5%) were men and 389 (38.5%) were women; 386 patients (38.2%) were aged 50 to 64 years, 377 (37.3%) were younger than 50 years, and 248 (24.5%) were 65 years and older. Consistent with the reported main analysis in the intent-to-treat population, RFS was longer in the pembrolizumab arm compared with the placebo arm (hazard ratio [HR], 0.56; 98.4% CI, 0.43-0.74) among patients who started treatment. The incidence of irAEs was 190 (37.4%) in the pembrolizumab arm (n = 509) and 45 (9.0%) in the placebo arm (n = 502); in each treatment group, the incidence was similar for men and women. The occurrence of an irAE was associated with a longer RFS in the pembrolizumab arm (HR, 0.61; 95% CI, 0.39-0.95; P =.03) in both men and women. However, in the placebo arm, this association was not significant. Compared with the placebo arm, the reduction in the hazard of recurrence or death in the pembrolizumab arm was greater after the onset of an irAE than without or before an irAE (HR, 0.37; 95% CI, 0.24-0.57 vs HR, 0.61; 95% CI, 0.49-0.77, respectively; P =.03). Conclusions and Relevance: In this study, the occurrence of an irAE was associated with a longer RFS in the pembrolizumab arm. Trial Registrations: ClinicalTrials.gov identifier: NCT02362594; EudraCT identifier: 2014-004944-37.