IMPORTANCE Treatment with methadone or buprenorphine is the current standard of care for opioid use disorder. Given the paucity of research identifying which patients will respond best to which medication, both medications should be accessible to all patients so that patients can determine which works best for them. However, given differences in the historical contexts of their initial implementation, access to each of these medications may vary along racial/ethnic lines. OBJECTIVE To examine the extent to which capacity to provide methadone and buprenorphine vary with measures of racial/ethnic segregation. DESIGN, SETTING, AND PARTICIPANTS This cross-sectional study included all counties and county-equivalent divisions in the US in 2016. Data on racial/ethnic population distribution were derived from the American Community Survey, and data on locations of facilities providing methadone and buprenorphine were obtained from Substance Abuse and Mental Health Services Administration databases. Data were analyzed from August 22, 2018, to September 11, 2019. EXPOSURES Two county-level measures of racial/ethnic segregation, including dissimilarity (representing the proportion of African American or Hispanic/Latino residents who would need to move census tracts to achieve a uniform spatial distribution of the population by race/ethnicity) and interaction (representing the probability that an African American or Hispanic/Latino resident will interact with a white resident and vice versa, assuming random mixing across census tracts). MAIN OUTCOMES AND MEASURES County-level capacity to provide methadone or buprenorphine, defined as the number of facilities providing a medication per 100 000 population. RESULTS Among 3142 US counties, there were 1698 facilities providing methadone (0.6 facilities per 100 000 population) and 18 868 facilities providing buprenorphine (5.9 facilities per 100 000 population). Each 1% decrease in probability of interaction of an African American resident with a white resident was associated with 0.6 more facilities providing methadone per 100 000 population. Similarly, each 1% decrease in probability of interaction of a Hispanic/Latino resident with a white resident was associated with 0.3 more facilities providing methadone per 100 000 population. Each 1% decrease in the probability of interaction of a white resident with an African American resident was associated with 8.17 more facilities providing buprenorphine per 100 000 population. Similarly, each 1% decrease in the probability of interaction of a white resident with a Hispanic/Latino resident was associated with 1.61 more facilities providing buprenorphine per 100 000 population. CONCLUSIONS AND RELEVANCE These findings suggest that the racial/ethnic composition of a community was associated with which medications residents would likely be able to access when (continued) Key Points Question Does county-level capacity to provide methadone and buprenorphine vary with measures of racial/ethnic segregation? Findings In this cross-sectional s...