© The Royal College of Psychiatrists 2015. Background: Individuals with cocaine and gambling addictions exhibit cognitive flexibility deficits that may underlie persistence of harmful behaviours. Aims: We investigated the neural substrates of cognitive inflexibility in cocaine users v. pathological gamblers, aiming to disambiguate common mechanisms v. cocaine effects. Method: Eighteen cocaine users, 18 pathological gamblers and 18 controls performed a probabilistic reversal learning task during functional magnetic resonance imaging, and were genotyped for the DRD2/ANKK Taq1A polymorphism. Results: Cocaine users and pathological gamblers exhibited reduced ventrolateral prefrontal cortex (PFC) signal during reversal shifting. Cocaine users further showed increased dorsomedial PFC (dmPFC) activation relative to pathological gamblers during perseveration, and decreased dorsolateral PFC activation relative to pathological gamblers and controls during shifting. Preliminary genetic findings indicated that cocaine users carrying the DRD2/ANKK Taq1A1+ genotype may derive unique stimulatory effects on shifting-related ventrolateral PFC signal. Conclusions: Reduced ventrolateral PFC activation during shifting may constitute a common neural marker across gambling and cocaine addictions. Additional cocaine-related effects relate to a wider pattern of task-related dysregulation, reflected in signal abnormalities in dorsolateral and dmPFC.