The vote was 344-81 to pass the National Defense Authorization Act (NDAA), which sets military policy and authorizes up to $696 billion in spending for the Department of Defense.
But the measure faces more hurdles before it can become law, notably because it would increase military spending beyond last year's $619 billion bill, which is barred by the 2011 Budget Control Act's caps on government spending.
Trump wants to pay for a military spending increase by slashing nondefense spending. His fellow Republicans control majorities in both the House and Senate, but they will need support from Senate Democrats, who have resisted such a budget shift, for Trump's plans to go into effect.
The House NDAA also increases spending on missile defense by 25 percent and provides a 2.4 percent salary increase for U.S. troops, their largest pay raise in eight years.
The Senate will vote on its version of the NDAA later this year, and the two versions must be reconciled before the measure can be sent to the White House for Trump to sign into law or veto.
During debate on amendments to the NDAA this week, the House rejected a Republican-sponsored amendment that would have ended the Pentagon's policy of providing gender-reassignment surgery and other therapy for active-duty transgender service members.
It also defeated a proposed Republican amendment that would have prevented the Pentagon from implementing climate-change and green energy policies.