Background Complement is likely to have a role in refractory generalised myasthenia gravis, but no approved therapies specifically target this system. Results from a phase 2 study suggested that eculizumab, a terminal complement inhibitor, produced clinically meaningful improvements in patients with anti-acetylcholine receptor antibody-positive refractory generalised myasthenia gravis. We further assessed the efficacy and safety of eculizumab in this patient population in a phase 3 trial. Methods We did a phase 3, randomised, double-blind, placebo-controlled, multicentre study (REGAIN) in 76 hospitals and specialised clinics in 17 countries across North America, Latin America, Europe, and Asia. Eligible patients were aged at least 18 years, with a Myasthenia Gravis-Activities of Daily Living (MG-ADL) score of 6 or more, Myasthenia Gravis Foundation of America (MGFA) class II–IV disease, vaccination against Neisseria meningitides, and previous treatment with at least two immunosuppressive therapies or one immunosuppressive therapy and chronic intravenous immunoglobulin or plasma exchange for 12 months without symptom control. Patients with a history of thymoma or thymic neoplasms, thymectomy within 12 months before screening, or use of intravenous immunoglobulin or plasma exchange within 4 weeks before randomisation, or rituximab within 6 months before screening, were excluded. We randomly assigned participants (1:1) to either intravenous eculizumab or intravenous matched placebo for 26 weeks. Dosing for eculizumab was 900 mg on day 1 and at weeks 1, 2, and 3; 1200 mg at week 4; and 1200 mg given every second week thereafter as maintenance dosing. Randomisation was done centrally with an interactive voice or web-response system with patients stratified to one of four groups based on MGFA disease classification. Where possible, patients were maintained on existing myasthenia gravis therapies and rescue medication was allowed at the study physician's discretion. Patients, investigators, staff, and outcome assessors were masked to treatment assignment. The primary efficacy endpoint was the change from baseline to week 26 in MG-ADL total score measured by worst-rank ANCOVA. The efficacy population set was defined as all patients randomly assigned to treatment groups who received at least one dose of study drug, had a valid baseline MG-ADL assessment, and at least one post-baseline MG-ADL assessment. The safety analyses included all randomly assigned patients who received eculizumab or placebo. This trial is registered with ClinicalTrials.gov, number NCT01997229. Findings Between April 30, 2014, and Feb 19, 2016, we randomly assigned and treated 125 patients, 62 with eculizumab and 63 with placebo. The primary analysis showed no significant difference between eculizumab and placebo (least-squares mean rank 56·6 [SEM 4·5] vs 68·3 [4·5]; rank-based treatment difference −11·7, 95% CI −24·3 to 0·96; p=0·0698). No deaths or cases of meningococcal infection occurred during the study. The most common adverse events in both groups were headache and upper respiratory tract infection (ten [16%] for both events in the eculizumab group and 12 [19%] for both in the placebo group). Myasthenia gravis exacerbations were reported by six (10%) patients in the eculizumab group and 15 (24%) in the placebo group. Six (10%) patients in the eculizumab group and 12 (19%) in the placebo group required rescue therapy. Interpretation The change in the MG-ADL score was not statistically significant between eculizumab and placebo, as measured by the worst-rank analysis. Eculizumab was well tolerated. The use of a worst-rank analytical approach proved to be an important limitation of this study since the secondary and sensitivity analyses results were inconsistent with the primary endpoint result; further research into the role of complement is needed. Funding Alexion Pharmaceuticals.