Although the gut and brain are separate organs, they communicate with each other via trillions of intestinal bacteria that collectively make up one's gut microbiome. Findings from both humans and animals support a critical role of gut microbes in regulating brain function, mood, and behavior. Gut bacteria influence neural circuits that are notably affected in addiction-related behaviors. These include circuits involved in stress, reward, and motivation, with substance use influencing gut microbial abnormalities, suggesting significant gut-brain interactions in drug addiction. Given the overwhelming rates of opioid overdose deaths driven by abuse and addiction, it is essential to characterize mechanisms mediating the abuse potential of opioids. We discuss in this review the role of gut microbiota in factors that influence opioid addiction, including incentive salience, reward, tolerance, withdrawal, stress, and compromised executive function. We present clinical and preclinical evidence supporting a bidirectional relationship between gut microbiota and opioid-related behaviors by highlighting the effects of opioid use on gut bacteria, and the effects of gut bacteria on behavioral responses to opioids. Further, we discuss possible mechanisms of this gut-brain communication influencing opioid use. By clarifying the relationship between the gut microbiome and opioid-related behaviors, we improve understanding on mechanisms mediating reward-, motivation-, and stress-related behaviors and disorders, which may contribute to the development of effective, targeted therapeutic interventions in opioid dependence and addiction.