Background: Although nicotine alters serotonergic neurochemistry, clinical trials of serotonergic medications for smoking cessation have provided mixed results. Understanding the role of serotonergic dysfunction in tobacco use disorder may advance development of novel pharmacotherapies. Methods: Functional magnetic resonance imaging was used to measure resting-state functional connectivity of the raphe nuclei as an indicator of serotonergic function. Connectivity of the dorsal and median raphe nuclei was compared between 18 young smokers (briefly abstinent, ~40 minutes post-smoking) and 19 young nonsmokers (16-21 years old); connectivity was also examined in a separate sample of overnight-abstinent smokers (18-25 years old), before and after smoking the first cigarette of the day. Relationships between connectivity of the raphe nuclei with psychological withdrawal and craving were tested in smokers. Results: Connectivity of the median raphe nucleus with the right hippocampal complex was weaker in smokers than in nonsmokers and was negatively correlated with psychological withdrawal in smokers. In overnight-abstinent smokers, smoking increased connectivity of the median raphe nucleus with the right hippocampal complex, and the increase was positively correlated with the decrease in psychological withdrawal. Conclusions: Relief of withdrawal due to smoking is potentially linked to the serotonergic pathway that includes the median raphe nucleus and hippocampal complex. These results suggest that serotonergic medications may be especially beneficial for smokers who endorse strong psychological withdrawal during abstinence from smoking.