BackgroundDrug abstinence is accompanied by aversive experiences and lasting changes in mood status and worsening sleep quality. This study investigated the potential effects of chronic repetitive transcranial magnetic stimulation (rTMS) in substance dependent inpatients during abstinence. MethodsThis was a double-blinded study with 105 males inpatients dependent on heroin or methamphetamine (average abstinence time was six months). The inpatients were randomly divided into 10 Hz intervention (n = 40), sham stimulation (n = 40) and control (waiting list, no treatment) (n = 25) groups. Five sessions of rTMS stimulation were administrated for six consecutive weeks, reaching a total of 180,000 pulses. There was no intervention for control group. Patients were assessed using the Pittsburgh Sleep Quality Index (PSQI), Self-rating Anxiety Scale (SAS) and Self-rating Depression Scale (SDS) were assessed prior to and after six weeks of intervention. ResultsThe results showed that six weeks of rTMS treatment significantly improved the sleep quality (p < 0.001), alleviated depression (p < 0.001) and anxiety state (p < 0.001) of substance dependent inpatients in early abstinence. Furthermore, the active TMS group showed significant differences between sham and control groups. ConclusionThese findings suggested that chronic rTMS treatment have positive effects for substance dependent inpatients during abstinence. Future studies are required to understand the underlying mechanism for improving different clinical symptoms.