Oxycodone is the most prescribed opioid for pain management and has been available in clinics for almost a century, but effects of chronic oxycodone have been studied less than morphine in preclinical and clinical studies. Newly developed depression has been coupled with chronic oxycodone use in a few clinical studies, but no preclinical studies have investigated the pathogenesis of oxycodone-induced depression. Gut microbiome changes following oxycodone use is an understudied area, and interleukin-17A (IL-17A) is linked to both the development of mood disorders and regulation of gut microbiome. The present study investigated effects of chronic oxycodone exposure on mood-related behaviors (depression and anxiety), pain hypersensitivity, physical dependence, immune markers, and the gut microbiome and tested the hypothesis that blocking IL-17A with a systemically administered monoclonal antibody reduces oxycodone-derived effects. Oxycodone (using an incremental dosing regimen) or saline was injected twice a day for 12 days. IL-17A Ab (200 µg/100 µl) or saline was administered every 3rd day during the 12-day interval. Chronic oxycodone induced a depression-like effect, but not anxiogenic- or anxiolytic-like effects; promoted hyperalgesia; increased IL-17A and IL-6 levels in the ventral tegmental area (VTA); and induced physical dependence. IL-17A Ab co-administration with oxycodone prevented the depression-like effect and hyperalgesia, reduced naloxone-precipitated withdrawal signs, and normalized the increase in cytokine levels. Chronic oxycodone exposure did not affect gut microbiome and integrity. Our results identify a role for IL-17A in oxycodone-related behavioral and neuroimmune effects and show that IL-17A Ab has potential therapeutic value in blocking these effects. Given that humanized IL-17A Ab is approved for treatment of psoriasis and psoriatic arthritis, our findings point toward studying it for use in the treatment of oxycodone use disorder.