Many patients with substance use disorders (SUDs) live in a stressful environment, and comorbidity is not uncommon. Understanding the neural mechanisms underlying heroin and nicotine dependences and their relationships to social cognition could facilitate behavioral therapy efficacy. We aimed to provide a translational approach that leads to identifying potential biomarkers for opioid use disorder (OUD) susceptibility during recovery. We examined the clinical characters and the relationships between theory of mind (ToM) and executive functions in three groups: heroin plus nicotine-dependent (HND) patients who had remained heroin abstinent (≥3 months), nicotine-dependent (ND) subjects, and healthy controls (C). The domains included emotion recognition, inhibition, shifting, updating, access, and processing speed. Resting-state functional connectivity (rsFC), ToM task-induced functional connectivity, and brain networks were then explored among 21 matched subjects using functional near-infrared spectroscopy. HND enhanced the severities of anxiety, depression, and hyperactivity. Inhibition domain was impaired in both HND and ND. No impairment in domains of emotion recognition, access, and update was observed. HND demonstrated enhanced rsFC in the medial prefrontal cortex and orbitofrontal cortex (OFC) and decreased ToM-induced connectivity across the PFC. The right superior frontal gyrus in the OFC (oSFG; x = 22, y = 77, and z = 6) was associated with working memory and emotion recognition in HND. Using a neuroimaging tool, these results supported the prominent reward-deficit-and-stress-surfeit hypothesis in SUDs, especially OUD, after protracted withdrawal. This may provide an insight in identifying potential biomarkers related to a dynamic environment.