Using task-based functional MRI, we examined inpatients with heroin use disorder. We found that 15 weeks of medication-assisted treatment (including supplemental group therapy) improved impaired anterior and dorsolateral prefrontal cortex function during an inhibitory control task. Inhibitory control, a core deficit in drug addiction, may be amenable to targeted prefrontal cortex interventions.