This paper explores the association between substance use prior to and during incarceration and between psychiatric distress and substance use during incarceration. A sample of 943 male residents from three prisons located in Spain completed a self-report questionnaire probing psychiatric distress and substance use behaviors. Rates of community- and prison-based substance use were high among respondents and prison-based substance use was positively associated with depression, anxiety, and stress symptoms during incarceration. These findings suggest a need to redouble the effort to provide dual diagnosis treatment to residents during incarceration and carefully monitor the prescribing and distribution of sedatives during incarceration.