The sweeping tax-cut and spending measure, Trump's top legislative goal, passed its first procedural hurdle in a 51 to 49 vote late on Saturday, US time (Sunday afternoon AEST), with two Republican senators voting against it.
The result came after several hours of negotiation as Republican leaders and Vice President JD Vance sought to persuade last-minute holdouts in a series of closed-door negotiations.
The procedural vote, which would start debate on the 940-page megabill to fund Trump's top immigration, border, tax-cut and military priorities, began after hours of delay.
It then remained open for more than three hours of standstill as three Republican senators joined Democrats to oppose the legislation.
In the end, Wisconsin Senator Ron Johnson flipped his no vote to yes, leaving only two senators opposed among Republicans.
Trump was monitoring the vote from the Oval Office late into the night, a senior White House official said.
The megabill - titled the One Big Beautiful Bill Act - would extend the 2017 tax cuts that were Trump's main legislative achievement during his first term as president, cut other taxes and boost spending on the military and border security.
Nonpartisan analysts estimate that a version of the bill would add trillions to US government debt.
Democrats fiercely opposed the bill, saying its tax-cut elements would disproportionately benefit the wealthy at the expense of social programs that lower-income Americans rely upon.
Elon Musk doubled down on his opposition to the bill, arguing the legislation would kill jobs and bog down burgeoning industries.
"The latest Senate draft bill will destroy millions of jobs in America and cause immense strategic harm to our country," Musk wrote on his social media platform X ahead of the vote.
"It gives handouts to industries of the past while severely damaging industries of the future."
The Tesla and SpaceX chief, whose birthday was also on Saturday, later posted the bill would be "political suicide for the Republican Party".
The criticisms reopened a recent fiery conflict between the former head of the Department of Government Efficiency and the administration he recently left.