WASHINGTON—Spooked by concern about deficits, the Senate shelved a spending bill that included an extension of unemployment benefits, suddenly cutting off a federal cash spigot opened by President Barack Obama when he took office 18 months ago.

The collapse of the wide-ranging legislation means that a total of 1.3 million unemployed Americans will have lost their assistance by the end of this week. It will also leave a number of states with large budget holes they had expected to fill with federal cash to help with Medicaid...