Cognitive impairment is common in people with multiple sclerosis and strongly affects their daily functioning. Reports have linked disturbed cognitive functioning in multiple sclerosis to changes in the organization of the functional network. In a healthy brain, communication between brain regions and which network a region belongs to is continuously and dynamically adapted to enable adequate cognitive function. However, this dynamic network adaptation has not been investigated in multiple sclerosis, and longitudinal network data remain particularly rare. Therefore, the aim of this study was to longitudinally identify patterns of dynamic network reconfigurations that are related to the worsening of cognitive decline in multiple sclerosis. Resting-state functional MRI and cognitive scores (expanded Brief Repeatable Battery of Neuropsychological tests) were acquired in 230 patients with multiple sclerosis and 59 matched healthy controls, at baseline (mean disease duration: 15 years) and at 5-year follow-up. A sliding-window approach was used for functional MRI analyses, where brain regions were dynamically assigned to one of seven literature-based subnetworks. Dynamic reconfigurations of subnetworks were characterized using measures of promiscuity (number of subnetworks switched to), flexibility (number of switches), cohesion (mutual switches) and disjointedness (independent switches). Cross-sectional differences between cognitive groups and longitudinal changes were assessed, as well as relations with structural damage and performance on specific cognitive domains. At baseline, 23% of patients were cognitively impaired (≥2/7 domains Z < -2) and 18% were mildly impaired (≥2/7 domains Z < -1.5). Longitudinally, 28% of patients declined over time (0.25 yearly change on ≥2/7 domains based on reliable change index). Cognitively impaired patients displayed more dynamic network reconfigurations across the whole brain compared with cognitively preserved patients and controls, i.e. showing higher promiscuity (P = 0.047), flexibility (P = 0.008) and cohesion (P = 0.008). Over time, cognitively declining patients showed a further increase in cohesion (P = 0.004), which was not seen in stable patients (P = 0.544). More cohesion was related to more severe structural damage (average r = 0.166, P = 0.015) and worse verbal memory (r = -0.156, P = 0.022), information processing speed (r = -0.202, P = 0.003) and working memory (r = -0.163, P = 0.017). Cognitively impaired multiple sclerosis patients exhibited a more unstable network reconfiguration compared to preserved patients, i.e. brain regions switched between subnetworks more often, which was related to structural damage. This shift to more unstable network reconfigurations was also demonstrated longitudinally in patients that showed cognitive decline only. These results indicate the potential relevance of a progressive destabilization of network topology for understanding cognitive decline in multiple sclerosis