Opioid use disorder (OUD) is characterized by emotional and cognitive impairements that are associated with poor treatment outcomes. The present study investigated the neural mechanism underlying emotion evaluation and inhibitory control using an affective go/no-go (AGN) task and its association with drug use severity and craving in patients with OUD. Twenty-six recently detoxified patients with OUD underwent functional magnetic resonance imaging (fMRI) while performing the AGN task that required response to frequently presented appetitive stimuli (“go”) and inhibition of response to infrequently presented aversive stimuli (“no-go”). The fMRI session was immediately followed by an injection of extended-release opioid antagonist naltrexone (XR-NTX). Participants’ opioid craving was assessed immediately before fMRI and 10 ± 2 days after XR-NTX injection. Multivariate pattern analysis (MVPA) showed that drug use severity was associated with distributed brain hypoactivity in response to aversive no-go stimuli, with particularly large negative contributions from the cognitive control and dorsal attention brain networks. While drug use severity and its associated MVPA brain response pattern were both correlated with opioid craving at baseline, only the brain response pattern predicted craving during XR-NTX treatment. Our findings point to widespread functional hypoactivity in the brain networks underlying emotional inhibitory control in OUD. Such a distributed pattern is consistent with the multifaceted nature of OUD, which affects multiple brain networks. It also highlights the utility of the multivariate approach in uncovering large-scale cortical substrates associated with clinical severity in complex psychiatric disorders and in predicting treatment response.