Attention deficit hyperactivity disorder (ADHD) and autism spectrum disorder (ASD) share brain function abnormalities during cognitive flexibility. Serotonin is involved in both disorders, and selective serotonin reuptake inhibitors (SSRIs) can modulate cognitive flexibility and improve behavior in both disorders. Thus, this study investigates shared and disorder-specific brain dysfunctions in these 2 disorders during reward reversal, and the acute effects of an SSRI on these. Age-matched boys with ADHD (15), ASD (18), and controls (21) were compared with functional magnetic resonance imaging (fMRI) during a reversal 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. Patients under each drug condition were compared with controls to assess normalization effects. fMRI data showed that, under placebo, ASD boys underactivated medial prefrontal cortex (mPFC), compared with control and ADHD boys. Both patient groups shared decreased precuneus activation. Under Fluoxetine, mPFC activation was up-regulated and normalized in ASD boys relative to controls, but down-regulated in ADHD boys relative to placebo, which was concomitant with worse task performance in ADHD. Fluoxetine therefore has inverse effects on mPFC activation in ASD and ADHD during reversal learning, suggesting dissociated underlying serotonin abnormalities.