BackgroundOpioids, defined as medicines that stimulate opioid receptors, are primarily used in the treatment of moderate to severe pain. They induce central nervous system (CNS) adverse effects. This study aimed to assess the effect of opioids on brain electrical activity, the effect of opioids on cognitive functions, and corroborate whether there was any correlation between changes in brain electrical activity and cognitive functions that may do in opioid addicts.MethodsThis cross-sectional case–control study was performed on 80 cases (divided into two groups 40 cases with tramadol use disorders and 40 cases with heroin use disorders) and 40 age-/sex-matched healthy control. All subjects were subordinated to neuropsychiatric evaluation, assessment of opioid use complaint through history from the case and his relatives, substance monitoring in urine, medicine abuse screening test (DAST), electroencephalography (EEG), and cognitive assessment by Montreal Cognitive Assessment (MOCA).ResultsOpioid dependence convinced global cognitive function impairment, specific cognitive disciplines impairment that included visual-conceptual, visual-motor tracking, visual-constructional skills, language function, attention, memory, and orientation. Additionally, affection of the brain’s electrical activities with significant changes compared with control. Comparison of cognitive impairment substantiated by lower cognitive scores in relation to abnormal EEG changes among studied case groups revealed significant differences.ConclusionsOpioid abusers had a significant impairment of cognitive functions and EEG changes with a significant correlation between changes in brain electrical activity and impairment of cognitive functions.