We examine the effect of corruption on foreign direct investments (FDI). Starting out from the theory of FDI, we show that corruption can have different effects on horizontal investments, which are primarily aimed at sales to the local market, compared to vertical investments, which are made to access lower factor costs for export sales. Using Swedish firm-level data, we find that corruption reduces the probability that a firm will invest in a country. Moreover, when studying the different types of investments, we find that horizontal investments, measured by affiliate local sales, are to a larger extent than vertical investments deterred by corruption. We are also able to establish a causal effect of corruption on FDI.