This paper provides the first theoretical and empirical analysis of how taxation shapes the joint allocation of risk and profits inside the multinational firm. Theoretically, we show that unconstrained firms optimally allocate all their risk to high-tax countries to maximize risk sharing with governments and all their profits to low-tax countries to minimize expected tax payments. However, transfer pricing rules requiring risk to be compensated with a higher expected return introduce a trade-off: the risk sharing motive to allocate risk to high-tax countries must be balanced against a pro.t shifting motive to allocate risk to low-tax countries. Empirically, we consistently find that multinational firms disproportionately allocate risk to low-tax countries. This suggests that the intra-firm allocation of risk and profits is effectively constrained by transfer pricing rules and that the profit shifting motive dominates the risk sharing motive. Finally, we show that within-firm differences in risk can account for a significant fraction of the well-established correlation between profits and tax rates suggesting that risk shifting is a quantitatively important channel for profit shifting.