By the mid-19th century, America was the most educated nation on Earth: significant financial investments in education were being undertaken and the majority of children "voluntarily" attended public schools. So why did states across America start introducing compulsory schooling laws at this time in history? We provide qualitative and quantitative evidence that states adopted compulsory schooling laws as a "nation-building" tool to instill civic values to the tens of millions of culturally diverse migrants who arrived during the 'Age of Mass Migration' between 1850 and 1914. We show the adoption of state level compulsory schooling laws occurred signi…cantly earlier in states that hosted a subgroup of European migrants with lower exposure to civic values in their home countries. We then use cross-county data to show the same subgroup of European migrants had signi…cantly lower demand for American common schooling pre-compulsion, and so would have been less exposed to the kinds of civic value instilled by the American education system had compulsory schooling not been passed. By studying the link between mass migration and the endogenous policy responses of American-born voters in receiving states, our analysis provides new micro-foundations for compulsory schooling laws, the legislative bedrock on which all future developments of the American schooling system were built.