THERE IS much that is laudable in this year’s National Defense Authorization Act that President Trump has reason to dislike, from the rebuke of his plan to withdraw troops from Germany and South Korea to the protection of the editorial independence of Voice of America and other government broadcasters he has assaulted. Yet, Mr. Trump has focused his ire on a matter that has next to nothing to do with the NDAA’s text, or even with national defense: Section 230 of the Communications Decency Act.

Section 230, or “the very dangerous & unfair Section 230,” as the president put it, protects Internet sites from liability for the content posted by their users — whether that content consists of tweets or comments on a restaurant review aggregator. This protection was designed to encourage platforms to permit robust expression as well as to design prohibitions as they pleased — each without risking being treated as publishers. While there’s room for reform on its finer points, it is overall a distinctly American and generally constructive formulation. Whereas Mr. Trump’s war on Section 230, waged out of pique that platforms are exercising their First Amendment right to label his lies, runs distinctly counter to the principles embodied in the Constitution.

This latest round of law-bashing — vowing to veto the defense bill if it does not revoke Section 230 — fits a pattern of the president lashing out against platforms when they personally displease him. The onslaught against “false trends” began on Thanksgiving night soon after #DiaperDon spread throughout Twitter. But there is no logic to the lame duck’s assertion that Section 230 is “a serious threat to our National Security & Election Integrity.” Indeed, the opposite is true: Section 230 is what empowers Facebook, Twitter and their like to aggressively combat terrorist content. It is also what empowers them to shield our democracy from meddling and misinformation. That includes misinformation from Mr. Trump himself, which platforms have largely countered not by removing posts but by appending fact-checking labels to them. This is hardly an attack on speech, yet it helps explain why the president is carrying out an offensive of his own.

The president’s veto threats may amount to no more than bluster. But if there’s bite to the bark, Congress ought to override a veto that uses a presidential pet peeve with Section 230 as an excuse to nix an otherwise perfectly good defense bill. Thankfully, Republicans seem to be sending the message that they have the votes to do exactly that. Refusing to submit to Mr. Trump’s whims in this matter would mean standing up to a president who seeks to abuse his power as the curtain closes on his time in office. It would also mean standing up for free expression on the Web.

Read more: