Difficulties in set-shifting are commonly reported in both autism spectrum disorder (ASD) and anorexia nervosa (AN) populations. Despite this, it is not known whether this cognitive profile persists across different ages, or whether the profiles seen in ASD and AN are comparable. This systematic review and meta-analyses aimed to compare the set-shifting profiles, as measured by the Wisconsin Card Sorting Test (WCST) in adults and younger people with either ASD or AN, relative to healthy controls (HCs) and to statistically compare performance on the WCST between ASD and AN. In all, 24 studies on ASD and 22 studies on AN were identified. In ASD, there were significant differences between the clinical group and HCs, with the ASD group making significantly more perseverative errors, indicating greater difficulty in set-shifting [pooled effect size of d = 0.67, 95% confidence interval (CI) 0.53–0.81, p ⩽ 0.001]. This effect was consistent across the age span. For AN studies, there was a significant difference between adults with AN and HCs (d = 0.52, 95% CI 0.36–0.68, p ⩽ 0.001) but a non-significant effect in child studies (d = 0.25, 95% CI −0.05 to 0.55, z = 1.66, p = 0.096). Meta-regression indicated no effect of diagnosis (AN or ASD) on performance in adult studies but there was a non-significant trend (p = 0.053) towards children with ASD performing worse than children with AN. While difficulties with set-shifting appear to be stable in ASD, there may be differences between children and adults with AN, which warrant further investigation.