The cognitive engagement hypothesis claims that regular exercise must be cognitively engaging in order to benefit executive functioning. However, the available evidence for this hypothesis is circumstantial. Here we test it directly in two studies. In Study 1, 145 young adults first reported the extent to which their primary exercise and non-exercise leisure activities were cognitively engaging. They then completed two well-known laboratory tasks measuring executive function: a flanker task to index inhibitory control and a backward digit span task to assess working memory. Structural equation modeling revealed that when participants reported that their exercise relied on inhibitory cognitive control, they performed better on the flanker task, and, when their exercise demanded cognitive flexibility, they performed better on a backward digit task. These relationships did not hold for their primary reported leisure activity. Study 2 confirmed this finding with an independent sample of 227 undergraduates and two different executive function tasks: a stop-signal task to index inhibitory control and a trail making B task to assess cognitive flexibility. When participants reported that their regular exercise relied on inhibitory control they had faster stop-signal reaction times and made fewer trail making errors, and, when their exercise relied on cognitive flexibility, they had slower stop-signal reaction times and longer trail making B completion times. These relationships were again not found for participants’ leisure activities. These findings support the claim that exercise is associated with cognitive performance on laboratory tasks, provided the exercise is itself cognitively demanding.