The vote was 88-11, with strong support from both Democrats and Republicans for the annual legislation setting policy for the Department of Defense. The House of Representatives passed it by 363-70 last week.
The tally had been 89-10 but Democratic Senator Cory Booker changed his vote later on Wednesday.
Biden is expected to sign the bill, but the White House did not respond to requests for comment on Wednesday.
The NDAA is closely watched by a broad swath of industry and other interests because it is one of the only major pieces of legislation that becomes law every year and because it addresses a wide range of issues.
The NDAA has become law every year for six decades.
Authorizing about 5% more military spending than last year, the fiscal 2022 NDAA is a compromise after intense negotiations between House and Senate Democrats and Republicans after being stalled by disputes over China and Russia policy. L1N2SK2SA
It includes a 2.7% pay increase for the troops, and more aircraft and Navy ship purchases in addition to strategies for dealing with geopolitical threats, especially Russia and China.
The NDAA includes $300 million for the Ukraine Security Assistance Initiative, which provides support to Ukraine's armed forces, $4 billion for the European Defense Initiative and $150 million for Baltic security cooperation.
On China, the bill includes $7.1 billion for the Pacific Deterrence Initiative and a statement of congressional support for the defense of Taiwan, as well as a ban on the Department of Defense procuring products produced with forced labor from China's Xinjiang region.
It creates a 16-member commission to study the war in Afghanistan. Biden ended the conflict - by far the country's longest war - in August.
This year's NDAA includes an overhaul of the military justice system to take decisions on whether to prosecute cases of rape, sexual assault and some other major crimes out of the hands of military commanders.
The change was a partial victory for activists because it did not strip military commanders of the authority to prosecute all felonies. It came after advocates led by Democratic Senator Kirsten Gillibrand waged a years-long effort to change the system in response to the thousands of cases of sexual assault among service members, many of which are never prosecuted.
The bill does not include some provisions included in earlier versions, notably one that would have required women to register for the military draft. The proposal had faced stiff opposition from a handful of socially conservative Republican lawmakers who thought it would erode traditional gender roles, threatening to stymie the entire NDAA.