The effect of lifetime depression was examined in a randomized clinical trial in 164 opioid- and cocaine-dependent patients who were treated with desipramine in combination with either methadone or buprenorphine. We examined treatment retention, illicit opioid and cocaine use, and depressive symptoms, and found that opioid-free urines at baseline, but not later in treatment, were greater among the depressed than non-depressed patients. Among the depressed patients, depressive symptoms at baseline, but not later in treatment, were greater in patients treated with buprenorphine than methadone. Desipramine did not reduce depressive symptoms more than placebo. Finally, the depressed patients treated with desipramine and buprenorphine showed the least improvement in opioid-free urines, while the non-depressed patients treated with desipramine and methadone had more opioid-free urines than those patients treated with placebo desipramine. Cocaine-free urines showed no association with depression. This poor outcome with desipramine and buprenorphine suggests that this medication combination is not indicated in depressed opioid-dependent patients.