Although Africa has experienced rapid urbanization in recent decades, little is known about the process of urbanization across the continent. This paper exploits a natural experiment, the abolition of South African pass laws, to explore how exogenous population shocks affect the spatial distribution of economic activity. Under apartheid, black South Africans were severely restricted in their choice of location, and many were forced to live in homelands. Following the abolition of apartheid they were free to migrate. Given a migration cost in distance, a town nearer to the homelands will receive a larger inflow of people than a more distant town following the removal of mobility restrictions. Drawing upon this exogenous variation, this study examines the effect of migration on urbanization in South Africa. While it is found that on average there is no endogenous adjustment of population location to a positive population shock, there is heterogeneity in the results. Cities that start off larger do grow endogenously in the wake of a migration shock, while rural areas that start off small do not respond in the same way. This heterogeneity indicates that population shocks lead to an increase in urban relative to rural populations. Overall, the evidence suggests that exogenous migration shocks can foster urbanization in the medium run.