Background. Attention deficit hyperactivity disorder (ADHD) and autism spectrum disorder (ASD) are often co-morbid and share performance and brain dysfunctions during working memory (WM). Serotonin agonists modulate WM and there is evidence of positive behavioural effects in both disorders. We therefore used functional magnetic resonance imaging (fMRI) to investigate shared and disorder-specific brain dysfunctions of WM in these disorders, and the effects of a single dose of the selective serotonin reuptake inhibitor (SSRI) fluoxetine. Method. Age-matched boys with ADHD (n = 17), ASD (n = 17) and controls (n = 22) were compared using fMRI during an N-back WM task. Patients were scanned twice, under either an acute dose of fluoxetine or placebo in a double-blind, placebo-controlled randomized design. Repeated-measures analyses within patients assessed drug effects on performance and brain function. To test for normalization effects of brain dysfunctions, patients under each drug condition were compared to controls. Results. Under placebo, relative to controls, both ADHD and ASD boys shared underactivation in the right dorsolateral prefrontal cortex (DLPFC). Fluoxetine significantly normalized the DLPFC underactivation in ASD relative to controls whereas it increased posterior cingulate cortex (PCC) deactivation in ADHD relative to control boys. Within-patient analyses showed inverse effects of fluoxetine on PCC deactivation, which it enhanced in ADHD and decreased in ASD. Conclusions. The findings show that fluoxetine modulates brain activation during WM in a disorder-specific manner by normalizing task-positive DLPFC dysfunction in ASD boys and enhancing task-negative default mode network (DMN) deactivation in ADHD.