Building cognitive abilities often requires sustained engagement with effortful tasks. We demonstrate that beliefs about willpower-whether willpower is viewed as a limited or non-limited resource-impact sustained learning on a strenuous mental task. As predicted, beliefs about willpower did not affect accuracy or improvement during the initial phases of learning; however, participants who were led to view willpower as non-limited showed greater sustained learning over the full duration of the task. These findings highlight the interactive nature of motivational and cognitive processes: motivational factors can substantially affect people's ability to recruit their cognitive resources to sustain learning over time.