Abstract Background Opioid use disorder (OUD) poses a great concern due to problems associated with their abuse as well as fatal and non fatal overdose consequences. Craving has a complex relationship with opioid use and relapse. Developing new, effective treatments for substance use disorders (SUDs), including opioid use disorders is crucial. This study aimed to assess the effect of 18 sessions of high frequency (HF) repetitive transcranial magnetic stimulation (rTMS) over the left dorsolateral prefrontal cortex (DLPFC) on opioid craving in early abstinence using brief substance craving scale (BSCS) for Tramadol and morphine and Heroin craving questionnaire (HCQ) for Heroin craving. Results There was a statistically significant reduction in craving scores in the group of OUD patients receiving real rTMS compared to those receiving sham rTMS for both BSCS( p value = 0.044) and HCQ (p value = 0.002). A statistically significant positive correlation was revealed between the number of hospital admissions and the mean scores of post rTMS HCQ scores (r = 0.05, p value = 0.040). Conclusion High frequency 10 Hz rTMS over the left DLPFC for 18 treatment sessions reduced craving OUD patients during early abstinence. These preliminary results suggest that 10 Hz rTMS of the left DLPFC may be used in treatment of OUD; so our study recommends that use of rTMS in reduction of opioid craving in early abstinence.