What is the optimal design of the international corporate tax system? We revisit this classic question in a multi-country general equilibrium model that incorporates three key features of the modern globalized economy: multinational production; intangible capital; and international profit shifting. Our model’s competitive equilibrium is inefficient due to an externality that arises from international spillovers in intangible investment. In the absence of profit shifting, there is little, if anything, a Ramsey planner can do with corporate income taxes to improve the allocation of intangible investment across countries. However, profit shifting allows the planner to use corporate income taxes to internalize the externality and achieve an efficient allocation of intangible investment. To quantitatively investigate the properties of the Ramsey planner’s optimal policy in a more realistic setting, we extend our model to an environment with firm heterogeneity and selection into multinational production. Without spillovers, it would be optimal to shut down profit shifting as much as possible. With spillovers, it would be optimal to allow MNEs to continue to shift profits, and if the planner is restricted to Pareto-improving policies, it would be optimal to allow even more profit shifting than under the status quo.