Cognitive dysfunction in people with relapsing-remitting multiple sclerosis can improve with cognitive rehabilitation or exercise. Similar effects have not been clearly shown in people with progressive multiple sclerosis. We aimed to investigate the individual and synergistic effects of cognitive rehabilitation and exercise in patients with progressive multiple sclerosis. CogEx was a randomised, sham-controlled trial completed in 11 hospital clinics, universities, and rehabilitation centres in Belgium, Canada, Denmark, Italy, UK, and USA. Patients with progressive multiple sclerosis were eligible for inclusion if they were aged 25-65 years and had an Expanded Disability Status Scale (EDSS) score of less than 7. All had impaired processing speed defined as a performance of 1·282 SD or greater below normative data on the Symbol Digit modalities Tests (SDMT). Participants were randomly assigned (1:1:1:1), using an interactive web-response system accessed online from each centre, to cognitive rehabilitation plus exercise, cognitive rehabilitation plus sham exercise, exercise plus sham cognitive rehabilitation, or sham exercise plus sham cognitive rehabilitation. The study statistician created the randomisation sequence that was stratified by centre. Participants, outcome assessors, and investigators were blinded to group allocation. The study statistician was masked to treatment during analysis only. Interventions were conducted two times per week for 12 weeks: cognitive rehabilitation used an individualised, computer-based, incremental approach to improve processing speed; sham cognitive rehabilitation consisted of internet training provided individually; the exercise intervention involved individualised aerobic training using a recumbent arm-leg stepper; and the sham exercise involved stretching and balance tasks without inducing cardiovascular strain. The primary outcome measure was processing speed measured by SDMT at 12 weeks; least squares mean differences were compared between groups using linear mixed model in all participants who had a 12-week assessment. The trial is registered with ClinicalTrials.gov, NCT03679468, and is completed. Between Dec 14, 2018, and April 2, 2022, 311 people with progressive multiple sclerosis were enrolled and 284 (91%) completed the 12-week assessment (117/311 [38%] male and 194/311 [62%] female). The least squares mean group differences in SDMT at 12 weeks did not differ between groups (p=0·85). Compared with the sham cognitive rehabilitation and sham exercise group (n=67), differences were -1·30 (95% CI -3·75 to 1·16) for the cognitive rehabilitation plus exercise group (n=70); -2·78 (-5·23 to -0·33) for the sham cognitive rehabilitation plus exercise group (n=71); and -0·71 (-3·11 to 1·70) for the cognitive rehabilitation plus sham exercise group (n=76). 11 adverse events possibly related to the interventions occurred, six in the exercise plus sham cognitive rehabilitation group (pain, dizziness, and falls), two in the cognitive rehabilitation plus sham exercise group (headache and pain), two in the cognitive rehabilitation and exercise group (increased fatigue and pain), and one in the dual sham group (fall). Combined cognitive rehabilitation plus exercise does not seem to improve processing speed in people with progressive multiple sclerosis. However, our sham interventions were not inactive. Studies comparing interventions with a non-intervention group are needed to investigate whether clinically meaningful improvements in processing speed might be attainable in people with progressive multiple sclerosis. MS Canada.