Atogepant, an oral calcitonin gene-related peptide receptor antagonist, has been approved for the preventive treatment of migraine, but its efficacy and safety in people who have been failed by conventional oral preventive migraine treatments has not yet been evaluated in a dedicated clinical trial. The ELEVATE trial evaluated the safety, tolerability, and efficacy of atogepant for the preventive treatment of episodic migraine in participants for whom two to four classes of conventional oral preventive treatments have failed. ELEVATE was a randomised, double-blind, placebo-controlled, parallel-group, phase 3b trial done at 73 sites in Canada, the Czech Republic, Denmark, France, Germany, Hungary, Italy, the Netherlands, Poland, Russia, Spain, the UK, and the USA. Adults (18-80 years) with episodic migraine who had previously been failed by two to four classes of conventional oral treatments for migraine prevention were randomly assigned (1:1) using interactive web response technology to oral atogepant 60 mg once a day or placebo, stratified by baseline monthly migraine days, number of treatment classes participants have been failed by, and region. The primary endpoint was change from baseline in mean monthly migraine days across the 12-week treatment period in the off-treatment hypothetical estimand (OTHE) population, which included participants in the safety population (all participants who received ≥1 dose of study intervention) who had evaluable data available for the baseline period and for one or more of the 4-week post-baseline periods (whether on treatment or off treatment). The primary endpoint was analysed using a mixed model for repeated measures and a fixed-sequence procedure was used to control for multiple comparisons. The trial is registered with ClinicalTrials.gov (NCT04740827) and EudraCT (2019-003448-58), and is completed. Between March 5, 2021, and Aug 4, 2022, 540 participants were screened, 315 were randomly assigned, and 313 participants (280 [89%] female, 33 [11%] male, and 300 [96%] White) received at least one dose of study intervention. In the OTHE population, which comprised 309 participants (155 assigned to placebo and 154 to atogepant), least squares mean changes from baseline in monthly migraine days across 12 weeks were -1·9 (SE 0·4) with placebo and -4·2 (0·4) with atogepant (least squares mean difference -2·4, 95% CI -3·2 to -1·5; adjusted p<0·0001). The most common treatment-emergent adverse event with atogepant was constipation in 16 (10%) of 156 participants (vs four [3%] of 157 for placebo). Serious adverse events occurred in four [3%] of 156 participants in the atogepant group vs none in the placebo group, and treatment-emergent adverse events resulting in treatment discontinuation occurred in three [2%] in the atogepant group vs two [1%] in the placebo group. Atogepant 60 mg once a day was safe, well tolerated, and showed significant and clinically relevant reductions in mean monthly migraine days compared with placebo across 12 weeks in patients with episodic migraine who had previously been failed by two to four classes of conventional oral preventive treatments. Atogepant might be an effective preventive treatment option for patients in this difficult-to-treat population. Allergan (now AbbVie).