Methods: The proposed study is a randomized controlled trial of group-based CBT compared to an educational supportive condition in patients currently receiving drug and alcohol treatment. At least 128 Veterans with alcohol or drug abuse or dependence and at least moderate pain currently treated in the Ann Arbor VA Substance Use Disorder treatment clinic will be assessed at baseline and then randomly assigned to one of these two conditions. These patients will be re-assessed at 3-months (i.e. immediately post treatment), 6-months and 12-months. The primary outcomes will be pain intensity, pain-related disability and pain tolerance. Mixed model regression analyses will be used for all primary analyses to estimate between-group differences in changes in individual slopes over time. Finally, a series of secondary analyses will explore (a) whether the intervention influences post-treatment substance use, (b) if change in pain during treatment mediates the effect of the intervention on subsequent substance use and (c) whether the hypothesized mechanisms of action for the CBT intervention mediate the effect of this intervention on pain intensity and pain tolerance.