OBJECTIVES: More than one quarter of HIV-infected people are undiagnosed and therefore unaware of their HIV-positive status. Blacks are disproportionately infected. Although perceived racism influences their attitudes toward HIV prevention, how racism influences their behaviors is unknown. We sought to determine whether perceiving everyday racism and racial segregation influence Black HIV testing behavior. METHODS: This was a clinic-based, multilevel study in a North Carolina city. Eligibility was limited to Blacks (N = 373) seeking sexually transmitted disease diagnosis or screening. We collected survey data, block group characteristics, and lab-confirmed HIV testing behavior. We estimated associations using logistic regression with generalized estimating equations. RESULTS: More than 90% of the sample perceived racism, which was associated with higher odds of HIV testing (odds ratio = 1.64; 95% confidence interval = 1.07, 2.52), after control for residential segregation, and other covariates. Neither patient satisfaction nor mechanisms for coping with stress explained the association. CONCLUSIONS: Perceiving everyday racism is not inherently detrimental. Perceived racism may improve odds of early detection of HIV infection in this high-risk population. How segregation influences HIV testing behavior warrants further research.