Falling profits and increased borrowing at U.S. companies are rattling debt markets, a sign the six-year-long economic recovery could be under threat.

Credit-rating firms are downgrading more U.S. companies than at any other time since the financial crisis, and measures of debt relative to cash flow are rising. Analysts expect profits at large companies to decline for a second straight quarter for the first time since 2009.

The...