We study the distributional effects of globalization within a model of heterogeneous agents where both managerial talent and knowledge of the local economic environment are required in order to set up a firm in a given country. Therefore, agents willing to set up a firm in a foreign country need to incur a learning cost that depends on how different is the foreign entrepreneurial environments from the domestic one. In this context, we show that globalization fosters FDI and raises wages, output and productivity. Moreover, it benefits workers and highly talented multinational entrepreneurs, while harming low-ability domestic producers. The effects of openness follow from highly efficient foreign entrepreneurs driving inefficient local firms out of the market. We provide empirical evidence consistent with the implications of the model, showing a significant negative effect of the distance between nationwide regulations indexes on bilateral FDI flows.