Opioids have been used to manage pain for thousands of years, but they have significant potential for abuse. Prescription opioids, like oxycodone, are associated with 32% of overdoses, that have reached a total of 75,673 deaths in 2021. A major challenge is maximizing their therapeutic potential while minimizing the negative side effects including opioid use disorder (OUD). The Ketogenic Diet (KD) has been reported to reduce pain and decrease the severity of alcohol use disorder, yet its effects on oxycodone responses remain unknown. KD mice displayed increased oxycodone-induced locomotor activity and enhanced antinociceptive effects of oxycodone, suggesting a dietary effect on opiate sensitivity. Male KD mice exposed to chronic oxycodone exhibited increased naloxone-induced jumps, suggesting a sex-specific effect of diet on opioid withdrawal. Consistent with this, male KD mice self-administered less oxycodone while female KD mice did not differ from controls. Finally, no effect of KD on motivation to obtain oxycodone was observed during a progressive ratio schedule. These data suggest sex-biased effects of KD on responses to opioids that should be considered and potentially leveraged in both clinical pain management and treatment of OUD.