The aim of this study was to determine if there are differences in cognitive flexibility in anorexia nervosa and bulimia nervosa. Fifty-three patients with an eating disorder (34 with anorexia nervosa and 19 with bulimia nervosa) and 35 healthy controls participated in the study. A battery of neuropsychological tests for cognitive flexibility was used, including Trail Making B, the Brixton Test, Verbal Fluency, the Haptic Illusion Test, a cognitive shifting task (CatBat) and a picture set test. Using exploratory factor analysis, four factors were obtained: 1: Simple Alternation; 2: Mental Flexibility; 3: Perseveration; and 4: Perceptual Shift. Patients with anorexia nervosa had abnormal scores on Factors 1 and 4. Patients with bulimia nervosa showed a different pattern, with significant impairments in Factors 2 and 4. These findings suggest that differential neuropsychological disturbance in the domain of mental flexibility/rigidity may underlie the spectrum of eating disorders.