Although craving states are important to both cocaine dependence (CD) and pathological gambling (PG), few studies have directly investigated neurobiological similarities and differences in craving between these disorders. We used functional magnetic resonance imaging (fMRI) to assess brain activity in 103 participants (30 CD, 28 PG, and 45 controls) while they watched videos depicting cocaine, gambling, and sad scenarios to investigate the neural correlates of craving. We observed a three-way urge type × video type × diagnostic group interaction in self-reported craving, with CD participants reporting strong cocaine cravings to cocaine videos, and PG participants reporting strong gambling urges to gambling videos. Neuroimaging data revealed a diagnostic group × video interaction in anterior cingulate cortex/ventromedial prefrontal cortex (mPFC), activating predominantly to cocaine videos in CD participants, and a more dorsal mPFC region that was most strongly activated for cocaine videos in CD participants, gambling videos in PG participants, and sad videos in control participants. Gender × diagnosis × video interactions identified dorsal mPFC and a region in posterior insula/caudate in which female but not male PG participants showed increased responses to gambling videos. Findings illustrate both similarities and differences in the neural correlates of drug cravings and gambling urges in CD and PG. Future studies should investigate diagnostic- and gender-specific therapies targeting the neural systems implicated in craving/urge states in addictions.