Female sex workers (FSWs) and female prisoners experience elevated HIV prevalence relative to the general population because of unprotected sex and unsafe drug use practices, but the antecedents of these behaviors are often structural in nature. We review the literature on HIV risk environments for FSWs and female prisoners, highlighting similarities and differences in the physical, social, economic, and policy/legal environments that need to be understood to optimize HIV prevention, treatment, and policy responses. Sex work venues, mobility, gender norms, stigma, debt, and the laws and policies governing sex work are important influences in the HIV risk environment among FSWs, affecting their exposure to violence and ability to practice safer sex and safer drug use behaviors. Female prisoners are much more likely to have a drug problem than do male prisoners and have higher HIV prevalence, yet are much less likely to have access to HIV prevention and treatment and access to drug treatment in prison. Women who trade sex or are imprisoned and engage in substance use should not be considered in separate silos because sex workers have high rates of incarceration and many female prisoners have a history of sex work. Repeated cycles of arrest, incarceration, and release can be socially and economically destabilizing for women, exacerbating their HIV risk. This dynamic interplay requires a multisectoral approach to HIV prevention and treatment that appreciates and respects that not all women are willing, able, or want to stop sex work or drug use. Women who engage in sex work, use drugs, or are imprisoned come from all communities and deserve sustained access to HIV prevention and treatment for substance use and HIV, helping them and their families to lead healthy and satisfying lives.