Cocaine self-administration can disrupt the capacity of humans and rodents to flexibly modify familiar behavioral routines, even when they become maladaptive or unbeneficial. However, mechanistic factors, particularly those driving long-term behavioral changes, are still being determined. Here, we capitalized on individual differences in oral cocaine self-administration patterns in adolescent mice and revealed that the post-synaptic protein PSD-95 was reduced in the orbitofrontal cortex (OFC) of escalating, but not stable, responders, which corresponded with later deficits in flexible decision-making behavior. Meanwhile, NMDA receptor GluN2B subunit content was lower in the OFC of mice that were resilient to escalatory oral cocaine seeking. This discovery led us to next co-administer the GluN2B-selective antagonist ifenprodil with cocaine, blocking the later emergence of cocaine-induced decision-making abnormalities. GluN2B inhibition also prevented cocaine-induced dysregulation of neuronal structure and function in the OFC, preserving mature, mushroom-shaped dendritic spine densities on deep-layer pyramidal neurons, which were otherwise lower with cocaine, and safeguarding functional BLA→OFC connections necessary for action flexibility. We posit that cocaine potentiates GluN2B-dependent signaling, which triggers a series of durable adaptations that result in the dysregulation of post-synaptic neuronal structure in the OFC and disruption of BLA→OFC connections, ultimately weakening the capacity for flexible choice. And thus, inhibiting GluN2B-NMDARs promotes resilience to long-term cocaine-related sequelae.