I develop an analytically tractable model that integrates the risk-shifting problem between bondholders and shareholders with the moral hazard problem between share-holders and the manager. The presence of managerial moral hazard exacerbates the risk-shifting problem. An optimal contract binds shareholders and the manager. The flexibility of this contract allows shareholders to relax the incentive constraint of the manager when a good profitability shock is drawn. Hence, the optimal contract am-plifies the upside thereby increasing shareholder appetite for risk-shifting. Moreover, some empirical studies find a positive relation between risk-shifting and leverage, while others studies find a negative relation. The model predicts a non-monoto...