Abstract This study examines how the institutional environment influences capital structure and debt maturity choices of firms in 39 developed and developing countries. We find that a country’s legal and tax system, corruption, and the preferences of capital suppliers explain a significant portion of the variation in leverage and debt maturity ratios. Specifically, firms in more corrupt countries and those with weaker laws tend to use more debt, especially short-term debt; explicit bankruptcy codes and deposit insurance are associated with higher leverage and more long-term debt. More debt is used in countries where there is a greater tax gain from leverage.