Synthetic opioids like fentanyl are highly potent and prevalent in the illicit drug market, leading to tolerance, dependence, and opioid use disorder (OUD). Chronic opioid use disrupts sleep and circadian rhythms, which persist even during treatment and abstinence, increasing the risk of relapse. The body's molecular clock, regulated by transcriptional and translational feedback loops, controls various physiological processes, including the expression of endogenous opioids and their receptors. The circadian transcription factor NPAS2, highly expressed in the nucleus accumbens, may have a crucial function in opioid-related behaviors. Our study found sex-specific roles for NPAS2-mediated reward behaviors in male and female mice, including in fentanyl seeking and craving. We also identified specific cell types and transcriptional targets in the nucleus accumbens of both mice and humans by which NPAS2 may mediate the impact of fentanyl on brain physiology and in opioid reward-related behaviors. Ultimately, our findings begin to uncover the mechanisms underlying circadian rhythm dysfunction and opioid addiction.