Summary Background Concurrent administration of the immune checkpoint inhibitors nivolumab and ipilimumab has shown greater efficacy than either agent alone in patients with advanced melanoma, albeit ...with more high-grade adverse events. We assessed whether sequential administration of nivolumab followed by ipilimumab, or the reverse sequence, could improve safety without compromising efficacy. Methods We did this randomised, open-label, phase 2 study at nine academic medical centres in the USA. Eligible patients (aged ≥18 years) with unresectable stage III or IV melanoma (treatment-naive or who had progressed after no more than one previous systemic therapy, with an Eastern Cooperative Oncology Group performance status of 0 or 1) were randomly assigned (1:1) to induction with intravenous nivolumab 3 mg/kg every 2 weeks for six doses followed by a planned switch to intravenous ipilimumab 3 mg/kg every 3 weeks for four doses, or the reverse sequence. Randomisation was done by an independent interactive voice response system with a permuted block schedule (block size four) without stratification factors. After induction, both groups received intravenous nivolumab 3 mg/kg every 2 weeks until progression or unacceptable toxicity. The primary endpoint was treatment-related grade 3–5 adverse events until the end of the induction period (week 25), analysed in the as-treated population. Secondary endpoints were the proportion of patients who achieved a response at week 25 and disease progression at weeks 13 and 25. Overall survival was a prespecified exploratory endpoint. This study is registered with ClinicalTrials.gov , number NCT01783938 , and is ongoing but no longer enrolling patients. Findings Between April 30, 2013, and July 21, 2014, 140 patients were enrolled and randomly assigned to nivolumab followed by ipilimumab (n=70) or to the reverse sequence of ipilimumab followed by nivolumab (n=70), of whom 68 and 70 patients, respectively, received at least one dose of study drug and were included in the analyses. The frequencies of treatment-related grade 3–5 adverse events up to week 25 were similar in the nivolumab followed by ipilimumab group (34 50%; 95% CI 37·6–62·4 of 68 patients) and in the ipilimumab followed by nivolumab group (30 43%; 31·1–55·3 of 70 patients). The most common treatment-related grade 3–4 adverse events during the whole study period were colitis (ten 15%) in the nivolumab followed by ipilimumab group vs 14 20% in the reverse sequence group), increased lipase (ten 15% vs 12 17%), and diarrhoea (eight 12% vs five 7%). No treatment-related deaths occurred. The proportion of patients with a response at week 25 was higher with nivolumab followed by ipilimumab than with the reverse sequence (28 41%; 95% CI 29·4–53·8 vs 14 20%; 11·4–31·3). Progression was reported in 26 (38%; 95% CI 26·7–50·8) patients in the nivolumab followed by ipilimumab group and 43 (61%; 49·0–72·8) patients in the reverse sequence group at week 13 and in 26 (38%; 26·7–50·8) and 42 (60%; 47·6–71·5) patients at week 25, respectively. After a median follow-up of 19·8 months (IQR 12·8–25·7), median overall survival was not reached in the nivolumab followed by ipilimumab group (95% CI 23·7–not reached), whereas over a median follow-up of 14·7 months (IQR 5·6–23·9) in the ipilimumab followed by nivolumab group, median overall survival was 16·9 months (95% CI 9·2–26·5; HR 0·48 95% CI 0·29–0·80). A higher proportion of patients in the nivolumab followed by ipilimumab group achieved 12-month overall survival than in the ipilimumab followed by nivolumab group (76%; 95% CI 64–85 vs 54%; 42–65). Interpretation Nivolumab followed by ipilimumab appears to be a more clinically beneficial option compared with the reverse sequence, albeit with a higher frequency of adverse events. Funding Bristol-Myers Squibb.