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, 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. We corroborate the results using an IV regression framework. We also provide the first cross-country evidence that reshoring is positively associated with wages and employment for workers in professional occupations but not for workers in elementary-routine occupations and that tariffs increase the reshoring intensity.