Opioid use disorder (OUD) is characterized by compulsive drug taking despite adverse life consequences. Here, we sought to identify neurobiological consequences associated with the behavioral effects of contingent footshocks administered after escalation of oxycodone self-administration. To reach these goals, Sprague-Dawley rats were trained to self-administer oxycodone for 4 weeks and were then exposed to contingent electric footshocks. This paradigm helped to dichotomize rats into two distinct behavioral phenotypes: (1) those that reduce lever pressing (shock-sensitive) and (2) others that continue lever pressing (shock-resistant) for oxycodone during contingent punishment. The rats were euthanized at 2-h after the last oxycodone plus footshock session. The dorsal striata and prefrontal cortices were dissected for use in western blot and RT-qPCR analyses. All oxycodone self-administration rats showed significant decreased expression of Mu and Kappa opioid receptor proteins only in the dorsal striatum. However, expression of Delta opioid receptor protein was decreased in both brain regions. RT-qPCR analyses documented significant decreases in the expression of c-fos, fosB, fra2, junB, egr1, and egr2 mRNAs in the dorsal striatum (but not in PFC) of the shock-sensitive rats. In the PFC, junD expression was reduced in both phenotypes. However, egr3 mRNA expression was increased in the PFC of only shock-resistant rats. These results reveal that, similar to psychostimulants and alcohol, footshocks can dichotomize rats that escalated their intake of oxycodone into two distinct behavioral phenotypes. These animals also show significant differences in the mRNA expression of immediate early genes, mainly, in the dorsal striatum. The increases in PFC egr3 expression in the shock-resistant rats suggest that Egr3 might be involved in the persistence of oxycodone-associated memory under aversive conditions. This punishment-driven model may help to identify neurobiological substrates of persistent oxycodone taking and abstinence in the presence of adverse consequences.