The current study aimed to evaluate anxiety behavior, hippocampal ionized calcium-binding adaptor molecule 1 (Iba1) and cannabinoid receptor 1 (CB1) gene expression, and nociceptive response in adulthood after a combination of fentanyl and cannabidiol (CBD) for nociceptive stimuli induced during the first week of life in rats. Complete Freund’s adjuvant-induced inflammatory nociceptive insult on postnatal day (PN) 1 and PN3. Both fentanyl and CBD were used alone or in combination from PN1 to PN7. Behavioral and nociceptive tests were performed at PN60 and PN62. The expression of the microglial calcium-binding proteins Iba1 and CB1 was detected in the hippocampus using reverse Quantitative polymerase chain reaction (qPCR) and immunohistochemistry. Our results suggest that the anxiety behavior response and immune activation in adult life depend on the CBD dose combined with fentanyl for the nociceptive stimuli induced during the first week of life. Treatment of neonatal nociceptive insult with CBD and opioids showed significant dose-dependent and male-female differences. The increased gene expression in the hippocampus of the analyzed cannabinoid gene supports this data. In addition, treatment with fentanyl led to an increase in CB1 protein expression. Moreover, the expression of Iba1 varied according to the administered dose of CBD and may or may not be associated with the opioid. A lower dose of CBD during the inflammatory period was associated with enhanced anxiety in adult life. PerspectiveThe treatment of nociceptive stimuli with CBD and opioids during the first week of life demonstrated significant sex differences in adult life on anxiety behavior and supraspinal pain sensitivity.