People who are incarcerated have a disproportionately high risk of HIV infection. They also tend to have risk factors associated with underutilization of antiretroviral therapy (ART) such as substance abuse, mental illness, and poor access to care. In this review, we describe how incarceration is a marker of vulnerability for suboptimal HIV care, and also how criminal justice settings may be leveraged as a platform for promoting testing, linkage, and retention in HIV care for a high-risk, marginalized population. In both prisons and jails, routine, opt-out HIV testing strategies are more appropriate for screening correctional populations than traditional, risk-based strategies. Rapid HIV testing is feasible and acceptable in busy, urban jail settings. Although ART is successfully administered in many prison settings, release to the community is strongly associated with inconsistent access to medications and other structural factors leading to loss of viral suppression. Collaborations among HIV clinicians, criminal justice personnel, and public health practitioners represent an important strategy for turning the tide on the HIV epidemic. Success will depend upon scaled-up efforts to seek individuals with undiagnosed infection and bring those who are out-of-care into long-term treatment.