Depression is one of the most common forms of psychopathology, which is associated with gut microbiota dysfunction. Dihydroartemisinin (DHA) has been shown to regulate gut microbiota and ameliorate neuropathies, but whether it can be used to treat depression remains unclear. Our study found that DHA treatment raised the preference for sugar water in chronic unpredictable mild stress (CUMS)-induced mice and reduce the immobility time in open field, forced swimming and tail suspension experiments, and promoted doublecortin expression. Additionally, DHA up-regulated the diversity and richness of intestinal microbiota in depression-like mice, and restored the abnormal expression of microbiota induced by CUMS, such as Turicibacter, Lachnospiraceae, Erysipelotrichaceae, Erysipelatoclostridium, Eubacterium, Psychrobacter, Atopostipes, Ileibacterium, Coriobacteriacea, Alistipes, Roseburia, Rikenella, Eggerthellaceae, Ruminococcus, Tyzzerella, and Clostridia. Furthermore, KEGG pathway analysis revealed that gut microbiota involved in the process of depression may be related to glucose metabolism, energy absorption and transport, and AMPK signaling pathway. These results indicated that DHA may play a protective role in CUMS-induced depression by mediating gut-microbiome.