This paper presents a model of the agency costs of debt finance, based on the conflict of interest between shareholders and bondholders. We show how the terms of the compensation contract offered to management by shareholders can reduce these agency costs. We derive a managerial compensation contract that restores the first-best outcome and leads to a local irrelevance result for financial structure. More generally, the model points out that the nature of managerial compensation contracts will affect the firm's optimal financial structure, and offers a reason why managerial compensation is typically not closely correlated with shareholder returns.