We propose a theoretical framework to analyze the offshoring and reshoring decisions of firms in the age of automation. Our theory suggests that increasing productivity in automation leads to a relocation of previously offshored production back to the home economy but without improving low-skilled wages and without creating jobs for low-skilled workers. Since it leads also to increasing wages for high-skilled workers, automation-induced reshoring is associated with an increasing skill premium and increasing inequality. We develop a measure for reshoring activity at the macro-level and, using data from the world input output table, we provide evidence for automation-driven reshoring. On average, within manufacturing sectors, an increase by one robot per 1000 workers is associated with a 3.5% increase of reshoring activity. Using robots in countries with similar sectoral structure as an instrument, we find that an increase by one robot per 1000 workers causes a 2.5% increase of reshoring activity. We also provide the first cross-country evidence that reshoring is positively associated with wages and employment for high-skilled labor but not for low-skilled labor and that tariffs increase the degree of reshoring.