"The future of American security and core strategic interests will be shaped by the outcome of this fight," he said ahead of the vote.
The bundle includes $6 billion earmarked for Ukraine to boost its armored vehicle inventory and air defense system.
Nearly $9 billion is set aside to help Ukraine ensure "continuity of government" as well as humanitarian aid.
Funds running out
Congress already approved almost $14 billion for Ukraine in mid-March, weeks after Russian president Vladimir Putin stunned the world with his invasion, but most has been spent.
As Russian forces have given up on seizing Kyiv but have stepped up fighting in eastern and southern Ukraine, Biden has been calling for another round of financial support.
The house of representatives had approved the $40 billion package last week but Rand Paul, like McConnell a Republican from Kentucky, prevented a quick vote in the Senate.
Paul, who opposes US interventionism, voiced concern about the cost and said that lawmakers should have been clearer on how to pay for the package and on monitoring where the money goes.
But senator Lindsey Graham, a hawkish republican who has previously called for the Russian president to be assassinated, said: "When it comes to Putin, either we pay now or we pay later."
Shortly after the vote, secretary of state Antony Blinken released another $100 million in previously approved funding for Ukraine.
The funding will include 18 new howitzers and some counter-artillery radar, Pentagon spokesman John Kirby said.
The United States tried for weeks to dissuade Russia from invading Ukraine and has responded with a sweeping pressure campaign, including sanctions targeting Putin.
In a rare resumption of dialogue, the top US and Russian generals, Mark Milley and Valery Gerasimov, spoke by telephone Thursday for the first time since the invasion, the Pentagon said.
Rallying behind NATO
Biden has cast the Ukraine war as part of a US-led great struggle of democracy against authoritarianism.
At the White House, he offered a red-carpet welcome to the leaders of Finland and Sweden days after they applied for NATO membership in the wake of Russia's invasion.
"The bottom line is simple. Quite straightforward: Finland and Sweden make NATO stronger," Biden said, offering the "full, total, complete backing of the United States of America."
"Sweden and Finland have strong democratic institutions, strong militaries and strong and transparent economies, and a strong moral sense of what is right," Biden said alongside Swedish prime minister Magdalena Andersson and Finnish president Sauli Niinisto in the White House Rose Garden.
"They meet every NATO requirement, and then some," Biden told assembled reporters without taking any questions.
Sweden and Finland have historically kept a distance from NATO as part of longstanding policies aimed at avoiding angering Russia but they shifted amid shock over the invasion of Ukraine, which has sought unsuccessfully to join the alliance.
Drawing an implicit contrast to his predecessor Donald Trump, Biden called NATO's mutual defense promise -- that an attack on one is an attack on all -- a "sacred commitment."
"We will never fail in our pledge to defend every single inch of NATO territory," Biden said, promising as well to defend Finland and Sweden while their applications are pending.
As with military funding, support for the two Nordic nations' membership is strong in the US senate, which needs to ratify any move involving treaties.
But all 30 existing members need to consent to adding another nation and Turkey has voiced misgivings due to the presence in Sweden and Finland of Kurdish militants.
Addressing Turkey, Niinisto said Finland opposes "terrorism" and is "open to discussing all the concerns that you may have."