This study tested whether cerebral oxygenation affects cognitive function during exercise. We measured reaction times (RT) of 12 participants while they performed a modified version of the Eriksen flanker task, at rest and while cycling. In the exercise condition, participants performed the cognitive task at rest and while cycling at three workloads [40, 60, and 80% of peak oxygen uptake ([Formula: see text])]. In the control condition, the workload was fixed at 20 W. RT was divided into premotor and motor components based on surface electromyographic recordings. The premotor component of RT (premotor time) was used to evaluate the effects of acute exercise on cognitive function. Cerebral oxygenation was monitored during the cognitive task over the right frontal cortex using near-infrared spectroscopy. In the exercise condition, we found that premotor time significantly decreased during exercise at 60% peak [Formula: see text] relative to rest. However, this improvement was not observed during exercise at 80% peak [Formula: see text]. In the control condition, premotor time did not change during exercise. Cerebral oxygenation during exercise at 60% peak [Formula: see text] was not significantly different from that at rest, while cerebral oxygenation substantially decreased during exercise at 80% peak [Formula: see text]. The present results suggest that an improvement in cognitive function occurs during moderate exercise, independent of cerebral oxygenation.