Background: This study examined whether starting buprenorphine treatment prior to prison and after release from prison would be associated with better drug treatment outcomes and whether males and females responded differently to the combination of in-prison treatment and post-release service setting. Methods: Study design was a 2 (In-Prison Treatment: Condition: Buprenorphine Treatment: vs. Counseling Only) x 2 [Post-Release Service Setting Condition: Opioid Treatment: Program (OTP) vs. Community Health Center (CHC)] x 2 (Gender) factorial design. The trial was conducted between September 2008 and July 2012. Follow-up assessments were completed in 2014. Participants were recruited from two Baltimore pre-release prisons (one for men and one for women). Adult pre-release prisoners who were heroin-dependent during the year prior to incarceration were eligible. Post-release assessments were conducted at 1, 3, 6, and 12-month following prison release. Results: Participants (N = 211) in the in-prison treatment condition effect had a higher mean number of days of community buprenorphine treatment compared to the condition in which participants initiated medication after release (P = 0.005). However, there were no statistically significant hypothesized effects for the in-prison treatment condition in terms of: days of heroin use and crime, and opioid and cocaine positive urine screening test results (all Ps >0.14) and no statistically significant hypothesized gender effects (all Ps >0.18). Conclusions: Although initiating buprenorphine treatment in prison compared to after-release was associated with more days receiving buprenorphine treatment in the designated community treatment program during the 12-months post-release assessment, it was not associated with superior outcomes in terms of heroin and cocaine use and criminal behavior. (C) 2017 Elsevier B.V. All rights reserved.