Dopamine is critical for reward-based decision making, yet dopaminergic drugs can have opposite effects in different individuals. This apparent discrepancy can be accounted for by hypothesizing an ‘inverted-U’ relationship, whereby the effect of dopamine agents depends on baseline dopamine system functioning. Here, we used functional MRI to test the hypothesis that genetic variation in the expression of dopamine D2 receptors in the human brain predicts opposing dopaminergic drug effects during reversal learning. We scanned 22 subjects while they engaged in a feedback-based reversal learning task. Ten subjects had an allele on the Taq1A DRD2 gene, which is associated with reduced dopamine receptor concentration and decreased neural responses to rewards (A1+ subjects). Subjects were scanned twice, once on placebo and once on cabergoline, a D2 receptor agonist. Consistent with an inverted-U relationship between the DRD2 polymorphism and drug effects, cabergoline increased neural reward responses in the medial orbitofrontal cortex, cingulate cortex and striatum for A1+ subjects but decreased reward responses in these regions for A1– subjects. In contrast, cabergoline decreased task performance and fronto-striatal connectivity in A1+ subjects but had the opposite effect in A1– subjects. Further, the drug effect on functional connectivity predicted the drug effect on feedback-guided learning. Thus, individual variability in how dopaminergic drugs affect the brain reflects genetic disposition. These findings may help to explain the link between genetic disposition and risk for addictive disorders.