We study the long-term determinants of the high rates of female HIV prevalence in sub-Saharan Africa, with a focus on the transatlantic slave trade. Our hypothesis is that the latter contributed to the contemporaneous diffusion of polygyny and associated forms of social and sexual behavior that are conducive to HIV infection. We uncover that an increase in the rate of historical slave density causes a sizeable and robust increase in the rate of HIV prevalence, with a more marked effect among married women, and particularly those that do not live with their husbands. A higher slave density also induces more widespread female infidelity. These patterns are consistent with the hypothesis that higher-rank, non-cohabiting, younger co-wives are driven to infidelity by marital dissatisfaction. The resulting risky sexual behavior increases their likelihood to contract and transmit the virus, through the husbands, to their faithful co-wives, with a multiplicative effect among women.