Twenty-six million people are living with HIV in sub-Saharan Africa; epidemics are widely dispersed, due to high levels of mobility. However, global elimination strategies do not consider mobility. We use Call Detail Records from 9 billion calls/texts to model mobility in Namibia; we quantify the epidemic-level impact by using a mathematical framework based on spatial networks. We find complex networks of risk flows dispersed risk countrywide: increasing the risk of acquiring HIV in some areas, decreasing it in others. Overall, 40% of risk was mobility-driven. Networks contained multiple risk hubs. All constituencies (administrative units) imported and exported risk, to varying degrees. A few exported very high levels of risk: their residents infected many residents of other constituencies. Notably, prevalence in the constituency exporting the most risk was below average. Large-scale networks of mobility-driven risk flows underlie generalized HIV epidemics in sub-Saharan Africa. In order to eliminate HIV, it is likely to become increasingly important to implement innovative control strategies that focus on disrupting risk flows.