This paper studies corporate taxation in a model where foreign investment of firms may affect the profitability of the investor firm's domestic activities. In this framework, corporate taxes distort the quality, not just the quantity of foreign direct investment flows. High-tax countries may see their tax revenues decrease in response to inbound foreign direct investment. Our results also imply that empirical studies on international profit shifting may overestimate the role of profit shifting. Observed profitability differences between high and low tax countries may be due to project selection. Empirical evidence in support of the main hypotheses is provided using aggregate investment and tax revenue data from a sample of OECD countries.