The proposal concerned an agreement on the budget for the coming half-year, as the current financing for several federal authorities expires on 1 October.
Republicans have demanded, in exchange for approving the budget, that states introduce a kind of citizenship control to register to vote. Johnson's proposal was also based on such a requirement. However, several Republicans rejected the proposal, which was expected.
Just hours before the vote, presidential candidate Donald Trump encouraged his party colleagues to continue using the threat of shutting down parts of the state, as long as it is not clear that the requirement for citizenship controls is implemented.
The requirement is rejected by Democrats. Critics argue that it would deprive millions of Americans who do not have easily accessible birth certificates or passports of the opportunity to register to participate in the election.
We have time to fix the situation and we will take care of it, said Johnson after the vote.