Using data for advanced and emerging economies, we show that there is a negative correlation between public debt and corporate investment. Industry-level regressions show that high levels of government debt are particularly damaging for industries that need more external financial resources. Firm-level regressions show that government debt increases the sensitivity of corporate investment to cash flow. These results indicate that the relationship between public debt and investment is likely to be causal and that public debt crowds out corporate investment by tightening credit constraints.