Executive function is a fundamental component of the human cognitive architecture. Here, we investigate the relationship between executive function and scientific reasoning. Eighth graders completed measures of three executive functions (EFs): shifting, inhibiting, and updating. They also completed a measure of cognitive flexibility, the Wisconsin Card Sort Task (WCST), that has predicted scientific reasoning in prior studies. Scientific reasoning was measured by a standardized test of science achievement. A principal components analysis found that the three EFs were separable. Different EFs predicted different aspects of cognitive flexibility; notably, participants with poor shifting ability made more perseverative errors. Both EF and WCST predicted science achievement. Of note was the finding that better updating (i.e., working memory) was associated with higher science scores. These findings illuminate the role of EF in cognitive flexibility and scientific reasoning, and point the way to future studies of the effect of training EF on science achievement.