Attention-deficit/hyperactivity disorder (ADHD) in childhood and adulthood is often treated with the psychostimulant methylphenidate (MPH). However, it is unknown whether cognitive effects of MPH depend on age in individuals with ADHD, while animal studies have suggested age-related effects. In this meta-analysis, we first determined the effects of MPH on response inhibition, working memory and sustained attention, but our main goal was to examine whether these effects are moderated by age. A systematic literature search using PubMed, PsycINFO, Web of Science and MEDLINE for double-blind, placebo-controlled studies with MPH resulted in 25 studies on response inhibition (n = 775), 13 studies on working memory (n = 559) and 29 studies on sustained attention (n = 956) (mean age range 4.8–50.1 years). The effects of MPH on response inhibition [effect size (ES) = 0.40, p < 0.0001, 95% confidence interval (CI) 0.22–0.58], working memory (ES = 0.24, p = 0.053, 95% CI 0.00–0.48) and sustained attention (ES = 0.42, p < 0.0001, 95% CI 26–0.59) were small to moderate. No linear or quadratic age-dependencies were observed, indicating that effects of MPH on executive functions are independent of age in children and adults with ADHD. However, adolescent studies are lacking and needed to conclude a lack of an age-dependency across the lifespan.