While a substantial body of work has shown that cognitive effort is aversive and costly, a separate line of research on intrinsic motivation suggests that people spontaneously seek challenging tasks. According to one prominent account of intrinsic motivation, the learning progress motivation hypothesis, the preference for difficult tasks reflects the dynamic range that these tasks yield for changes in task performance (Kaplan & Oudeyer, 2007). Here we test this hypothesis, by asking whether greater engagement with intermediately difficult tasks, indexed by subjective ratings and objective pupil measurements, is a function of trial-wise changes in performance. In a novel paradigm, we determined each individual’s capacity for task performance and used difficulty levels that are low, intermediately challenging or high for that individual. We demonstrated that challenging tasks resulted in greater liking and engagement scores compared with easy tasks. Pupil size tracked objective task difficulty, where challenging tasks were associated with greater pupil responses than easy tasks. Most importantly, pupil responses were predicted by trial-to-trial changes in average accuracy as well as learning progress (derivative of average accuracy), while greater pupil responses also predicted greater subjective engagement scores. Together, these results substantiate the learning progress motivation hypothesis stating that the link between task engagement and cognitive effort is mediated the dynamic range for changes in task performance.