Institutions affect investment decisions, including investments in human capital. Hence institutions are relevant for the allocation of talent. Good market-supporting institutions attract talent to productive value-creating activities, whereas poor ones raise the appeal of rent-seeking. We propose a theoretical model that predicts that more talented individuals are particularly sensitive in their career choices to the quality of institutions, and test these predictions on a sample of around 95 countries of the world. We find a strong positive association between the quality of institutions and graduation of college and university students in science, and an even stronger negative correlation with graduation in law. Our findings are robust to various specifications of empirical models, including smaller samples of former colonies and transition countries. The quality of human capital makes the distinction between educational choices under strong and weak institutions particularly sharp. We show that the allocation of talent is an important link between institutions and growth.