The emotional-reactivity hypothesis proposes that problem-solving abilities can be constrained by temperament, within and across species. One way to test this hypothesis is with the predictions of the Yerkes–Dodson law. The law posits that arousal level, a component of temperament, affects problem solving in an inverted U-shaped relationship: Optimal performance is reached at intermediate levels of arousal and impeded by high and low levels. Thus, a powerful test of the emotional-reactivity hypothesis is to compare cognitive performance in dog populations that have been bred and trained based in part on their arousal levels. We therefore compared a group of pet dogs to a group of assistance dogs bred and trained for low arousal (N = 106) on a task of inhibitory control involving a detour response. Consistent with the Yerkes–Dodson law, assistance dogs, which began the test with lower levels of baseline arousal, showed improvements when arousal was artificially increased. In contrast, pet dogs, which began the test with higher levels of baseline arousal, were negatively affected when their arousal was increased. Furthermore, the dogs’ baseline levels of arousal, as measured in their rate of tail wagging, differed by population in the expected directions. Low-arousal assistance dogs showed the most inhibition in a detour task when humans eagerly encouraged them, while more highly aroused pet dogs performed worst on the same task with strong encouragement. Our findings support the hypothesis that selection on temperament can have important implications for cognitive performance.