© 2019 Swift et al. This is an open access article distributed under the terms of the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited. Background In the United States whites are more likely to misuse opioid pain relievers (OPRs) than blacks, and blacks are less likely to be prescribed OPRs than whites. Our objective is to determine whether racial discrimination in medical settings is protective for blacks against OPR misuse, thus mediating the black-white disparities in OPR misuse. Methods We used data from 3528 black and white adults in the Coronary Artery Risk Development in Young Adults (CARDIA) study, an ongoing multi-site cohort. We employ causal mediation methods, with race (black vs white) as the exposure, lifetime discrimination in medical settings prior to year 2000 as the mediator, and OPR misuse after 2000 as the outcome. Results We found black participants were more likely to report discrimination in a medical setting (20.3% vs 0.9%) and less likely to report OPR misuse (5.8% vs 8.0%, OR = 0.71, 95% CI = 0.55, 0.93, adjusted for covariates). Our mediation models suggest that when everyone is not discriminated against, the disparity is wider with black persons having even lower odds of reporting OPR misuse (OR = 0.63, 95% CI = 0.45, 0.89) compared to their white counterparts, suggesting racial discrimination in medical settings is a risk factor for OPR misuse rather than protective. Conclusions These results suggest that racial discrimination in a medical setting is a risk factor for OPR misuse rather than being protective, and thus could not explain the seen black-white disparity in OPR misuse.