We aimed to explore the association between baseline executive functioning and treatment outcome in Therapeutic Communities (TCs). Methods: We used a longitudinal descriptive design: a baseline neuropsychological assessment was performed within the first 30 days of treatment in TCs. Once participants finished or abandoned treatment, the information about time of stay in treatment was computed for each individual. The study was conducted across six TCs located in the region of Andalusia (Spain): Cartaya, Almonte, Mijas, Los Palacios, La L?nea, and Tarifa. Participants were 131 patients with cocaine dependence who initiated and finished treatment in TCs between January 2009 and December 2010 (2 years). Cognitive assessment was composed of general measures of executive functioning: Letter Number Sequencing (working memory) and Similarities (reasoning), and executive tasks sensitive to ventromedial prefrontal cortex dysfunction, including the Delis-Kaplan Stroop test (inhibition/cognitive switching), the Revised-Strategy Application Test (strategy application/multitasking), and the Iowa Gambling Task (decision-making). The outcome measure was retention, defined as time in TC treatment (number of days). Results: Poor executive functioning significantly predicted shorter treatment retention in cocaine dependent individuals on TC residential treatment (14 of explained variance). Reduced performance on the R-SAT, a multitasking test taxing the ability to develop and apply the best strategy to organize multiple sub-routine tasks in order to achieve a long-term goal, was the most powerful predictor of treatment retention. Conclusions: Self-regulation deficits predict the capacity to remain in residential treatment among cocaine dependents.