The majority of people with HIV live in sub-Saharan Africa, where epidemics are generalized. For these epidemics to develop, populations need to be mobile. However, the role of population-level mobility in the development of generalized HIV epidemics has not been studied. Here we do so by studying historical migration data from Botswana, which has one of the most severe generalized HIV epidemics worldwide; HIV prevalence was 21% in 2021. The country reported its first AIDS case in 1985 when it began to rapidly urbanize. We hypothesize that, during the development of Botswana’s epidemic, the population was extremely mobile and the country was highly connected by substantial migratory flows. We test this mobility hypothesis by conducting a network analysis using a historical time series (1981-2011) of micro-census data from Botswana. Our results support our hypothesis. We found complex migration networks with very high rates of rural-to-urban, and urban-to-rural, migration: 10% of the population moved annually. Mining towns (where AIDS cases were first reported, and risk behavior was high) were important in-flow and out-flow migration hubs, suggesting that they functioned as ‘core groups’ for HIV transmission and dissemination. Migration networks could have dispersed HIV throughout Botswana and generated the current hyperendemic epidemic.