The gut microbiome has emerged as a promising target for modulating adverse effects of opioid exposure due to its significant role in health and disease. Opioid use disorder (OUD) has become increasingly prevalent, specifically in women of reproductive age, contributing to an increased incidence of offspring exposed to opioids in utero. Recent studies have shown that prenatal opioid exposure (POE) is associated with notable changes to the maternal gut microbiome, with subsequent implications for the offspring's microbiome and other adverse outcomes. However, the role of the gut microbiome in mediating sex-based differences in pain sensitivity has not yet been investigated. In this study, both male and female C57BL/6 offspring were used to determine sex-based differences in nociception and gut microbial composition as a result of POE. Our data reveals significant sex-based differences in offspring prenatally exposed to opioids. The gut microbiome of opioid-exposed females showed an enrichment of commensal bacteria including