Without an agreement, many federal agencies will shut down at midnight for the first time in 17 years.
The vote came less than 10 hours before a possible shutdown and with no compromise in sight. Democrats—and a few Republicans—are pressing for the House to approve a straightforward spending bill with no conditions.
Earlier in the day, President Barack Obama said that he's "not at all" resigned to a government shutdown, and that he expects to speak to congressional leaders during the day try to come to an agreement.
At least one GOP House member said he thought a shutdown was unlikely.
"I think we are not going to shut down the government. We are going to do the right thing," said Representative Pete Sessions, the chairman of the House Rules Committee.
After the vote, Standard and Poor's issued a statement saying the debt ceiling debate is "unlikely" to change AA rating of of US debt.
(Read more: Here comes the DC shutdown: What you need to know)