In a dramatic late-night session, senators blocked a bill to extend government funding through Feb. 16. The bill needed 60 votes in the 100-member Senate but fell short with only 50 supporting it.
Most Democrats opposed the bill because their efforts to include protections for hundreds of thousands for the young immigrants known as Dreamers failed.
Huddled negotiations by Senate majority leader Mitch McConnell and Senate Democratic leader Chuck Schumer in the last minutes before midnight were unsuccessful, and the U.S. government technically ran out of money at midnight.
The shutdown formally began on Saturday, the first anniversary of President Donald Trump's inauguration.
Trump's administration immediately sought to blame Democrats.
"Tonight, they put politics above our national security, military families, vulnerable children, and our country’s ability to serve all Americans," the White House said in a statement.
The Trump administration said it would not discuss immigration until the government is up and running again. "When Democrats start paying our armed forces and first responders, we will reopen negotiations on immigration reform," the statement said.
Until a funding deal is worked out, scores of federal agencies across the country will be unable to operate, and hundreds of thousands of "non-essential" federal workers will be put on temporary unpaid leave.
The Republican-controlled House of Representatives passed a stopgap funding measure on Thursday. But Republicans then needed the support of at least 10 Democrats to pass the bill in the Senate. While five Democrats ended up voting for the measure, five Republicans voted against it.
Democratic leaders demanded that the measure include protections from deportation for about 700,000 undocumented immigrants known as Dreamers who arrived in the United States as children.
Republicans refused to include those protections, and neither side was willing to back down. McConnell and Schumer insisted they were still committed to finding an agreement that restores government funding as soon as possible.
Trump, who had made strict measures on immigration a cornerstone of his presidential campaign, last week rejected a bipartisan proposal, saying he wanted to include any deal for Dreamers in a bigger legislative package that also boosts funding for a border wall and tighter security at the U.S. border with Mexico.
In a shutdown, "essential" employees who deal with public safety and national security would keep working. That includes more than 1.3 million people on active duty in the military who would be required to work but would not be paid until funding is renewed.
Although past government shutdowns have done little lasting damage to the U.S. economy, they can rattle financial markets.
The new shutdown could trigger a political battle between Democrats and Republicans over who is to blame.
It follows a months-long struggle in Congress to agree on government funding levels and the immigration issue.