We study the impact of offshoring on the mental health of onshore employees. Using the job demands-resources framework, we argue that increased job complexity and heightened job insecurity due to offshoring has a negative effect on the mental health of onshore employees. In addition, we hypothesize that this effect is heterogeneous among firms and depends on the mode of offshoring (internal versus external ownership), offshoring destination (intra versus extra-regional), type of offshored activity (support versus primary activities), and whether jobs are lost at the onshore location. Estimating two-way fixed effect difference-in-difference models with panel data (2011-2018) for 1.1 million employees working at 2500 firms in the Netherlands, we find a negative and long-lasting effect of offshoring on the mental health of onshore employees. The effect is stronger in the case of internal ownership, extra-regional offshoring, offshoring of support (ICT) activities, and when offshoring results in layoffs.