This paper shows that long debt maturities eliminate equityholders' incentives to reduce leverage when the firm performs poorly. By contrast, short debt maturities commit equityholders to such leverage reductions. However, shorter debt maturities also lead to higher transactions costs when maturing bonds must be refinanced. We show that this tradeoff between higher expected transactions costs against the commitment to reduce leverage when the firm is doing poorly motivates an optimal maturity structure of corporate debt. Since firms with high costs of financial distress benefit most from committing to leverage reductions, they have a stronger motive to issue short-term debt.