Fatigue is one of the most disabling symptoms reported by people with multiple sclerosis. Although behavioural and pharmacological interventions might be partly beneficial, their combined effects have not been evaluated for multiple sclerosis fatigue, or examined with sufficient consideration of characteristics that might affect treatment response. In this comparative effectiveness research trial, we compared the effectiveness of cognitive behavioural therapy (CBT), modafinil, and their combination for treating multiple sclerosis fatigue. This randomised, analyst-blinded, parallel-arm, comparative effectiveness trial was done at two universities in the USA. Adults (aged ≥18 years) with multiple sclerosis and problematic fatigue (Fatigue Severity Scale [FSS] score ≥4) were randomly assigned (1:1:1), using a web-based treatment assignment system with minimisation, to receive CBT, modafinil, or both for 12 weeks. Statisticians were masked to group assignment, but participants, study neurologists, CBT interventionalists, and coordinators were not masked to treatment assignment. The primary outcome was the change in Modified Fatigue Impact Scale (MFIS) from baseline to 12 weeks, assessed using multiple linear regression, adjusted for age, sex, study site, anxiety, pain, baselines MFIS score, and physical activity. Analyses were done by intent to treat. The trial was registered with clinicaltrials.gov, NCT03621761, and is completed. Between Nov 15, 2018, and June 2, 2021, 336 participants were randomly assigned treatment (114 assigned to CBT, 114 assigned to modafinil, and 108 assigned to combination therapy). At 12 weeks, CBT (n=103), modafinil (n=107), and combination therapy (n=102) were associated with clinically meaningful within-group MFIS reductions of 15·20 (SD 11·90), 16·90 (15·90), and 17·30 (16·20) points, respectively. Change in MFIS scores from baseline to 12 weeks did not differ between groups: relative to combination therapy, the adjusted total mean difference in MFIS change score was 1·88 (95% CI -2·21 to 5·96) for CBT and 1·20 (-2·83 to 5·23) for modafinil. Most common adverse events for modafinil-containing treatment groups included insomnia (eight [7%] for modafinil and eight [7%] for combination therapy) and anxiety (three [3%] for modafinil and nine [8%] for combination therapy). Modafinil, CBT, and combination therapy were associated with similar reductions in the effects of multiple sclerosis fatigue at 12 weeks. Combination therapy was not associated with augmented improvement compared with the individual interventions. Further research is needed to determine whether effects of these interventions on multiple sclerosis-related fatigue is influenced by sleep hygiene and sleepiness. No serious adverse events related to the study drug were encountered. Patient-Centered Outcomes Research Institute and National Multiple Sclerosis Society.