The gut microbiota play an important role in many central nervous system diseases through the gut microbiota-brain axis. Recent studies suggest that nicotinamide riboside (NR) has neuroprotective properties. However, it is unknown whether NR can prevent or protect against alcohol-induced depression. Furthermore, it is unclear whether its therapeutic action involves changes in the composition of the gut microbiome. Here, we investigated the effects of NR in the mouse model of alcohol-induced depression. Treatment with NR improved the alcohol-induced depressive behaviour in mice. In addition, NR decreased the number of activated microglia in the hippocampus, and it reduced the levels of pro-inflammatory (IL-1β, IL-6, and TNF-α) and anti-inflammatory (IL-10 and TGF-β) cytokines in the brain of mice with alcohol-induced depression. Furthermore, NR significantly upregulated BDNF and diminished the inhibition of the AKT/GSK3β/β-catenin signalling pathway in the hippocampus of these mice. 16S rRNA sequencing revealed that, compared with control and NR-treated mice, the gut microbiome richness and composition were significantly altered in the depressed mice. Spearman's correlation analysis showed that differential gut bacterial genera correlated with the levels of inflammation-related cytokines and BDNF in the brain. After faecal microbiota transplantation, cognitive behaviours, microglial activity, levels of cytokines and BDNF, and activation state of the AKT/GSK3β/β-catenin signalling pathway (which is downstream of the BDNF receptor, TrkB) in recipient mice were similar to those in donor mice. Collectively, our findings show that NR dietary supplementation protects against alcohol-induced depression-like behaviours, possibly by altering the composition of the gut microbiota.