Methylphenidate (MPH) is the leading drug for treatment of attention deficit/hyperactivity disorder (ADHD), yet its underlying neuronal mechanisms are still unclear. Here, we use a dynamical brain networks approach to explore the effects of cognitive effort and MPH on ADHD subjects. Electroencephalography data were recorded from 19 ADHD subjects and 18 controls during a Go/No-Go Task. ADHD subjects completed the task twice a day over 2 days. The second session was administered post-ingestion of placebo/MPH (alternately). Controls performed two tasks in 1 day. The data were divided into 300 ms windows from -300 pre-stimulus until 1200 ms post-stimulus. Brain networks were constructed per subject and window, from which network metrics were extracted and compared across the experimental conditions. We identified an immediate shift of global connectivity and of network segregation after the stimulus for both groups, followed by a gradual return to baseline. Decreased global connectivity was found to be 400-700 ms post-stimulus in ADHD compared with controls, and it was normalized post-MPH. An increase of the networks' segregation occurred post-placebo at 100-400 and 400-700 ms post-stimulus, yet it was inhibited post-MPH. These global alterations resulted mainly from changes in task-relevant frontal and parietal regions. The networks of medicated ADHD subjects and controls exhibited a more significant and lasting change, relative to baseline, compared with those of nonmedicated ADHD. These results suggest impaired network flexibility in ADHD, corrected by MPH.