Background : Among individuals diagnosed with substance dependence, major depressive disorder (MDD) is the most common co-occurring Axis I disorder and is associated with greater treatment costs and poor treatment response. Recently revised models recognize substance use behaviors as a complex interplay of distal risk, proximal risks, intrapersonal processes, and contextual factors but few studies have examined mediators and moderators of change in this population, which would inform the development and delivery of clinical interventions. Methods : Veterans (N = 209) meeting DSM-IV criteria for substance dependence with recent use and substance-independent MDD with current depressive symptoms received group Twelve-Step Facilitation (TSF) or Integrated Cognitive-Behavioral Therapy (ICBT). Both groups received adjunct pharmacotherapy. Measures were assessed at baseline and at 3-month intervals during 6 months of treatment and 12 months of follow-up. Outcomes were percent days drinking and percent days using drugs. Results : In Study 1 TSF had superior improvement in depression during treatment, which was mediated by greater Alcoholics/Narcotics Anonymous (AA/NA) meeting attendance. In both groups the effects of AA/NA attendance on future drinking were mediated through depression. In Study 2 TSF was significantly higher than ICBT on AA/NA attendance and affiliation at end-of-treatment, but during follow-up TSF had greater decreases in AA/NA attendance and affiliation, which mediated greater increases in drinking. In Study 3 greater self-efficacy and lower social network drinking/drug use predicted lower future drinking and drug use. Social network effects were moderated by context, with greater effects of social networks for veterans with less time in constrained environments. In Study 4 greater neurocognitive impairment predicted greater drinking and drug use indirectly through lower self-efficacy, lower AA/NA affiliation, and greater depressive symptoms. Furthermore, AA/NA affiliation interacted with depression and neurocognitive impairment to predict future drinking, such that the effects of 12-step affiliation were strongest for those with severe neurocognitive impairment when they were severely depressed. Discussion : In adults receiving treatment for co-occurring substance dependence and major depression, negative affect, AA/NA attendance, self-efficacy, and social network substance use are key proximal factors linked to drinking and drug use outcomes, and severity of neurocognitive impairment impacts treatment through indirect associations with these proximal variables.