Educational attainment is a key factor for understanding why some individuals migrate and others do not. Compulsory schooling laws, which determine an individual’s minimum level of education, can potentially affect migration. We test whether and how increasing the length of compulsory schooling influences migration of affected cohorts across European countries, a context where labor mobility is essentially free. We construct a novel database that includes information for 31 European countries on compulsory education reforms passed between 1950 and 1990. Combining this data with information on recent migration flows by cohorts, we find that an additional year of compulsory education reduces the number of individuals from affected cohorts who migrate in a given year by 9 %. Our results rely on the exogeneity of compulsory schooling laws. A variety of empirical tests indicate that European legislators did not pass compulsory education reforms as a reaction to changes in emigration rates or educational attainment.