We present two studies testing whether self-efficacy mediates the relationship between depression symptoms and initial abstinence duration after substance use treatment in adolescents and adults. Study 1: Adolescents (N = 208) were recruited from substance use treatment in an urban/suburban area in the United States between 1999 and 2005 and were followed monthly after discharge. Measures used were affective state (depression symptoms), drug-taking coping self-efficacy, and length of abstinence after treatment. Self-efficacy fully mediated the relationship between depression and time to use. Study 2: In a similar study design, adult veterans (N = 160) in outpatient substance user treatment were interviewed during treatment and monthly following treatment. Depression was negatively associated with self-efficacy, and self-efficacy predicted time to first substance use, but there was no mediation. Study implications and limitations are noted.