The molecular alterations that underlie the long-lasting behavioural effects of drugs of abuse, such as psychomotor sensitization and physical dependence, are still not known. Moreover, it is not known which molecular effects are similar for addictive drugs from various pharmacological classes. In this study, we utilized whole-genome microarray profiling to evaluate the detailed time-course of transcriptional alterations in the mouse striatum during chronic treatment with heroin (HER) and methamphetamine (METH) and after period of spontaneous withdrawal. We identified 27 genes regulated by chronic drug administration. The overlap between lists of HER- and METH-induced genes was highly significant. The most substantial impact on the gene expression profile was observed for circadian genes (Per1, Per2 and Nr1d1). However, changing the treatment scheme from diurnal to nocturnal was sufficient to attenuate the drug-induced changes in circadian gene mRNA levels. Both of the drugs caused a dose-dependent induction in glucocorticoid-dependent genes with relatively long mRNA half-lives (Fkbp5, Sult1a1 and Plin4). The analysis also showed a drug-regulated group of transcripts enriched in the nucleus accumbens and includes well known (Pdyn, Cartpt and Rgs2) as well as new (Fam40b and Inmt) candidate genes. All identified alterations in the striatal transcriptome were transient and persisted up to 6 days after withdrawal. Behavioural sensitization, however, was maintained throughout the 12-day withdrawal period for both HER and METH. We suggest that transient gene expression alterations during drug treatment and in the early period of withdrawal are involved in the establishment of persistent neuroplastic alterations responsible for the development of drug addiction.