Recent research shows that emotional facial expressions impact behavioral responses only when their valence is relevant to the task. Under such conditions, threatening faces delay attentional disengagement, resulting in slower reaction times and increased omission errors compared to happy faces. To investigate the neural underpinnings of this phenomenon, we used functional magnetic resonance imaging to record the brain activity of 23 healthy participants while they completed two versions of the go/no-go task. In the emotion task (ET), participants responded to emotional expressions (fearful or happy faces) and refrained from responding to neutral faces. In the gender task (GT), the same images were displayed, but participants had to respond based on the posers’ gender. Our results confirmed previous behavioral findings and revealed a network of brain regions (including the angular gyrus, the ventral precuneus, the left posterior cingulate cortex, the right anterior superior frontal gyrus, and two face-responsive regions) displaying distinct activation patterns for the same facial emotional expressions in the ET compared to the GT. We propose that this network integrates internal representations of task rules with sensory characteristics of facial expressions to evaluate emotional stimuli and exert top-down control, guiding goal-directed actions according to the context.