Trump vows to reject defence bill passed by majority
With just weeks remaining in the White House, Trump has criticized the $740.5 billion measure in part because it does not abolish a law granting social media firms liability protection for third-party content on their platforms.
Trump has said social media giants like Facebook and Google are biased against him.
Read more: How US blackmail pushed Sudan to normalise relations with Israel
He has also voiced disapproval of the bill's language calling for renaming US military bases that honor commanders from the pro-slavery South in the Civil War.
In a short, all-caps Twitter message, Trump said, "The biggesty winner of our new defense bill is China. I will veto!"
The legislation was approved with well beyond the two-thirds "super-majority" needed to overcome a veto: 84-13 in the Republican-led Senate, and 335-78 in the Democratic-controlled House of Representatives.
Presuming Trump follows through on his pledge, the legislation would be sent back to Congress where lawmakers would have to approve it by a two-thirds majority to override the president.
The defence bill was a particular priority for some Republicans.
Republican Senator Jim Inhofe, chairman of the Armed Services Committee, called it "the most important bill of the year."
The bill also mandates that the president slap sanctions on Turkey within 30 days for its acquisition of a Russian-made missile defense system. Trump has resisted such punishments against Turkey and its president, Recep Tayyip Erdogan.