The pathophysiology of major depressive disorder (MDD) includes both affective and cognitive dysfunctions. We aimed to clarify how regions regulating affective processing interact with those involved in attention, and how such interaction impacts perceptual processing within sensory cortices. Based on previous work showing that top-down influences from attention can determine the processing of external inputs within early sensory cortices, we tested with functional magnetic resonance imaging (fMRI) whether MDD alters attentional ("top-down") effects on the neural filtering of irrelevant, nonemotional visual stimuli. The present fMRI study was conducted in 14 nonmedicated patients with a first episode of unipolar MDD and 14 matched controls. During scanning, subjects performed two tasks imposing two different levels of attentional load at fixation (easy or difficult), while irrelevant colored stimuli were presented in the periphery. Analyses of fMRI data revealed that MDD patients show (1) an abnormal filtering of irrelevant information in visual cortex, (2) an altered functional connectivity between frontoparietal networks and visual cortices, and (3) a hyperactivity in subgenual cingulate/medial orbitofrontal cortex that was modulated by attentional load. These results demonstrate that biological abnormalities contribute to the cognitive deficits seen in major depression, and clarify how neural networks implicated in mood regulation influence executive control and perceptual processes. These findings not only improve our understanding of the pathophysiological mechanisms underlying cognitive dysfunctions in MDD, but also shed new light on the interaction between cognition and mood regulation.