Drug-induced malfunction of nucleus accumbens (NAc) neurons underlies a key pathophysiology of drug addiction. Drug-induced changes in intrinsic membrane excitability of NAc neurons are thought to be critical for producing behavioral alterations. Previous studies demonstrate that, after short-term (2 d) or long-term (21 d) withdrawal from noncontingent cocaine injection, the intrinsic membrane excitability of NAc shell (NAcSh) neurons is decreased, and decreased membrane excitability of NAcSh neurons increases the acute locomotor response to cocaine. However, animals exhibit distinct cellular and behavioral alterations at different stages of cocaine exposure, suggesting that the decreased membrane excitability of NAc neurons may not be a persistent change. Here, we demonstrate that the membrane excitability of NAcSh neurons is differentially regulated depending on whether cocaine is administered contingently or noncontingently. Specifically, the membrane excitability of NAcSh medium spiny neurons (MSNs) was decreased at 2 d after withdrawal from either 5 d intraperitoneal injections (15 mg/kg) or cocaine self-administration (SA). At 21 d of withdrawal, the membrane excitability of NAcSh MSNs, which remained low in intraperitoneally pretreated rats, returned to a normal level in SA-pretreated rats. Furthermore, after a reexposure to cocaine after long-term withdrawal, the membrane excitability of NAcSh MSNs instantly returned to a normal level in intraperitoneally pretreated rats. Conversely, in SA-pretreated rats, the reexposure elevated the membrane excitability of NAcSh MSMs beyond the normal level. These results suggest that the dynamic alterations in membrane excitability of NAcSh MSNs, together with the dynamic changes in synaptic input, contribute differentially to the behavioral consequences of contingent and noncontingent cocaine administration.