Pain engages and interacts with high-level cognitive processing. Previous studies documented that distracting someone through a challenging activity leads to hypoalgesia, an effect held to be mediated by parietal and prefrontal structures, who monitor pain-evoked neural response and maintain attention towards task-relevant events. Instead, alternative accounts suggest that challenging activities affect the ability to regulate one’s aching experiences, due to partially-common neural substrate between cognitive control and pain at the level the medial prefrontal cortex, which could lead to hyperalgesic after-effects. Here we pulled apart effects of distraction and cognitive control on pain by delivering thermal painful stimulations either During or After (factor TIME) the engagement of a interfering Stroop paradigm (requiring high cognitive control) or a neutral condition (factor TASK). We found that TIME influenced individual assessment of pain, with less intense ratings associated to the During condition. This hypoalgesia was associated with increased activity at the level of dorsolateral prefrontal cortex and the posterior parietal cortex, in interaction with the insular cortex. This was complemented by multivariate pattern analysis who revealed that distraction altered the neural response to pain, by making it more similar to that associated with previous Stroop tasks. Critically, all these effects were observed independently of the nature of the TASK employed which, instead, led to a localized neural modulation at the level of anterior cingulate cortex. Overall, our study underscores the role played by two different faces of human executive functions, which exert independent influence in the neural response evoked by thermal pain..