Climate change, especially the warming trend experienced by several countries, could affect agricultural productivity. As a consequence, rural incomes will change, and with them the incentives for people to remain in rural areas. Using data from 116 countries between 1960 and 2000, we analyze the effect of differential warming trends across countries on the probability of either migrating out of the country or from rural to urban areas. We find that higher temperatures increased migration rates to urban areas and other countries in middle income economies. In poor countries, higher temperatures reduced the probability of migration to cities or to other countries, consistent with the presence of severe liquidity constraints. In middle-income countries, migration represents an important margin of adjustment to global warming, potentially contributing to structural change and even increasing income per worker. Such a mechanism, however, does not seem to work in poor economies.