The following analyses have been performed for the cognitive enhancing effects of methylphenidate are well established, but the mechanisms remain unclear. We recently demonstrated that methylphenidate boosts cognitive motivation by enhancing the weight on the benefits of a cognitive task in a manner that depended on striatal dopamine. Here, we considered the complementary hypothesis that methylphenidate might also act by changing the weight on the opportunity cost of a cognitive task, that is, the cost of foregoing alternative opportunity. To this end, 50 healthy participants (25 women) completed a novel cognitive effort-discounting task that required choices between task and leisure. They were tested on methylphenidate, placebo, as well as the selective D2-receptor agent sulpiride, the latter to strengthen inference about dopamine receptor selectivity of methylphenidate’s effects. Furthermore, they also underwent an [18F]DOPA PET scan to quantify striatal dopamine synthesis capacity. Methylphenidate boosted choices of cognitive effort over leisure across the group, and this effect was greatest in participants with more striatal dopamine synthesis capacity. The effects of sulpiride did not reach significance. This study strengthens the motivational account of methylphenidate’s effects on cognition, and suggests that methylphenidate reduces the cost of mental labor by increasing striatal dopamine.