For patients with non-small-cell lung cancer (NSCLC) and multiple brain metastases, whole-brain irradiation (WBI) is a standard-of-care treatment, but its effects on neurocognition are complex and concerning. We compared the efficacy of an epidermal growth factor receptor (EGFR)-tyrosine kinase inhibitor (TKI), icotinib, versus WBI with or without chemotherapy in a phase 3 trial of patients with EGFR-mutant NSCLC and multiple brain metastases. We did a multicentre, open-label, parallel randomised controlled trial (BRAIN) at 17 hospitals in China. Eligible participants were patients with NSCLC with EGFR mutations, who were naive to treatment with EGFR-TKIs or radiotherapy, and had at least three metastatic brain lesions. We randomly assigned participants (1:1) to either icotinib 125 mg orally (three times per day) or WBI (30 Gy in ten fractions of 3 Gy) plus concurrent or sequential chemotherapy for 4-6 cycles, until unacceptable adverse events or intracranial disease progression occurred. The randomisation was done by the Chinese Thoracic Oncology Group with a web-based allocation system applying the Pocock and Simon minimisation method; groups were stratified by EGFR gene mutation status, treatment line (first line or second line), brain metastases only versus both intracranial and extracranial metastases, and presence or absence of symptoms of intracranial hypertension. Clinicians and patients were not masked to treatment assignment, but individuals involved in the data analysis did not participate in the treatments and were thus masked to allocation. Patients receiving icotinib who had intracranial progression only were switched to WBI plus either icotinib or chemotherapy until further progression; those receiving icotinib who had extracranial progression only were switched to icotinib plus chemotherapy. Patients receiving WBI who progressed were switched to icotinib until further progression. Icotinib could be continued beyond progression if a clinical benefit was observed by the investigators (eg, an improvement in cognition or intracranial pressure). The primary endpoint was intracranial progression-free survival (PFS), defined as the time from randomisation to either intracranial disease progression or death from any cause. We assessed efficacy and safety in the intention-to-treat population (all participants who received at least one dose of study treatment), hypothesising that intracranial PFS would be 40% longer (hazard ratio [HR] 0·60) with icotinib compared with WBI. This trial is registered with ClinicalTrials.gov, number NCT01724801. Between Dec 10, 2012, and June 30, 2015, we assigned 176 participants to treatment: 85 to icotinib and 91 to WBI. 18 withdrew from the WBI group before treatment, leaving 73 for assessment. Median follow-up was 16·5 months (IQR 11·5-21·5). Median intracranial PFS was 10·0 months (95% CI 5·6-14·4) with icotinib versus 4·8 months (2·4-7·2) with WBI (equating to a 44% risk reduction with icotinib for an event of intracranial disease progression or death; HR 0·56, 95% CI 0·36-0·90; p=0·014). Adverse events of grade 3 or worse were reported in seven (8%) of 85 patients in the icotinib group and 28 (38%) of 73 patients in the WBI group. Raised concentrations of alanine aminotransferase and rash were the most common adverse events of any grade in both groups, occurring in around 20-30% of each group. At the time of final analysis, 42 (49%) patients in the icotinib group and 37 (51%) in the WBI group had died. 78 of these patients died from disease progression, and one patient in the WBI group died from thrombogenesis related to chemotherapy. In patients with EGFR-mutant NSCLC and multiple brain metastases, icotinib was associated with significantly longer intracranial PFS than WBI plus chemotherapy, indicating that icotinib might be a better first-line therapeutic option for this patient population. Guangdong Provincial Key Laboratory of Lung Cancer Translational Medicine, National Health and Family Planning Commission of China, Guangzhou Science and Technology Bureau, Betta Pharmaceuticals, and the Chinese Thoracic Oncology Group.