Background: Treatment outcomes for multidrug-resistant tuberculosis remain poor. We aimed to estimate the association of treatment success and death with the use of individual drugs, and the optimal number and duration of treatment with those drugs in patients with multidrug-resistant tuberculosis. Methods: In this individual patient data meta-analysis, we searched MEDLINE, Embase, and the Cochrane Library to identify potentially eligible observational and experimental studies published between Jan 1, 2009, and April 30, 2016. We also searched reference lists from all systematic reviews of treatment of multidrug-resistant tuberculosis published since 2009. To be eligible, studies had to report original results, with end of treatment outcomes (treatment completion [success], failure, or relapse) in cohorts of at least 25 adults (aged >18 years). We used anonymised individual patient data from eligible studies, provided by study investigators, regarding clinical characteristics, treatment, and outcomes. Using propensity score-matched generalised mixed effects logistic, or linear regression, we calculated adjusted odds ratios and adjusted risk differences for success or death during treatment, for specific drugs currently used to treat multidrug-resistant tuberculosis, as well as the number of drugs used and treatment duration. Findings: Of 12 030 patients from 25 countries in 50 studies, 7346 (61%) had treatment success, 1017 (8%) had failure or relapse, and 1729 (14%) died. Compared with failure or relapse, treatment success was positively associated with the use of linezolid (adjusted risk difference 0·15, 95% CI 0·11 to 0·18), levofloxacin (0·15, 0·13 to 0·18), carbapenems (0·14, 0·06 to 0·21), moxifloxacin (0·11, 0·08 to 0·14), bedaquiline (0·10, 0·05 to 0·14), and clofazimine (0·06, 0·01 to 0·10). There was a significant association between reduced mortality and use of linezolid (–0·20, –0·23 to –0·16), levofloxacin (–0·06, –0·09 to –0·04), moxifloxacin (–0·07, –0·10 to –0·04), or bedaquiline (–0·14, –0·19 to –0·10). Compared with regimens without any injectable drug, amikacin provided modest benefits, but kanamycin and capreomycin were associated with worse outcomes. The remaining drugs were associated with slight or no improvements in outcomes. Treatment outcomes were significantly worse for most drugs if they were used despite in-vitro resistance. The optimal number of effective drugs seemed to be five in the initial phase, and four in the continuation phase. In these adjusted analyses, heterogeneity, based on a simulated I2 method, was high for approximately half the estimates for specific drugs, although relatively low for number of drugs and durations analyses. Interpretation: Although inferences are limited by the observational nature of these data, treatment outcomes were significantly better with use of linezolid, later generation fluoroquinolones, bedaquiline, clofazimine, and carbapenems for treatment of multidrug-resistant tuberculosis. These findings emphasise the need for trials to ascertain the optimal combination and duration of these drugs for treatment of this condition. Funding: American Thoracic Society, Canadian Institutes of Health Research, US Centers for Disease Control and Prevention, European Respiratory Society, Infectious Diseases Society of America.