The G.O.P.-led House formally censured Representative Adam B. Schiff, Democrat of California, on Wednesday over his role investigating former President Donald J. Trump, the first in what could be a series of votes seeking to punish those whom Republicans have deemed the party’s enemies.

The censure passed by a party-line vote of 213 to 209 with six Republicans voting “present.” The measure had the backing of Speaker Kevin McCarthy after its lead sponsor, Representative Anna Paulina Luna, Republican of Florida, altered its language to remove a multimillion-dollar fine some Republicans viewed as unconstitutional.

“Adam Schiff launched an all-out political campaign built on baseless distortions against a sitting U.S. president,” Ms. Luna said. The censure accused him of engaging in “falsehoods, misrepresentations and abuses of sensitive information” as he sought to unearth connections between Mr. Trump and Russia.

It is rare for a member of Congress to be censured, a punishment that amounts to a public reprimand. The House has censured members just 24 times in the chamber’s history, and typically only after a finding of wrongdoing. Before Mr. Schiff, just two members of the House had been censured in almost four decades.

Democrats erupted in chants of “Shame!” at the Republicans after the vote, and surrounded Mr. Schiff in a protective circle as he walked to the well of the House to receive the censure. Representative Eric Swalwell, Democrat of California, called out that the proceedings were a “disgrace.”

Five of the six Republicans who voted “present” are members of the Ethics Committee. Such a vote is traditional to maintain independence in such cases for ethics panel members, who would have the task of investigating Mr. Schiff.

Mr. Schiff, who is seeking a Senate seat and has cited the censure against him in fund-raising efforts, said he was being made a target solely because he had stood up to Mr. Trump.

Mr. Schiff led the first impeachment prosecution against Mr. Trump and served on the House committee investigating the Jan. 6, 2021, attack on the Capitol.

“You honor me with your enmity,” Mr. Schiff told the Republicans from the House floor, pointing out that Mr. Trump had been indicted over charges that he mishandled classified documents.

“Donald Trump is under indictment for actions that jeopardize our national security and McCarthy would spend the nation’s time on petty political payback, thinking he can censure or fine Tump’s opposition into submission,” Mr. Schiff said. “But I will not yield. Not one inch.”

The vote came at a time of rising Republican anger, as hard-right members in Congress increasingly agitate for the impeachment of President Biden or members of his administration.

Representative Lauren Boebert, Republican of Colorado and a leader of the ultraconservative House Freedom Caucus, is seeking to force a vote on impeaching Mr. Biden this week. Representative Marjorie Taylor Greene, Republican of Georgia, who has been pushing to impeach the F.B.I. director Christopher Wray, on Wednesday accused Ms. Boebert of copying her impeachment articles against Mr. Biden.

But Mr. McCarthy on Wednesday sought to impose a sense of strategy upon his fractious conference. The speaker used a closed-door meeting of Republicans to argue against a quick impeachment of Mr. Biden, according to a person familiar with the matter.

Mr. McCarthy argued Republicans would look inconsistent if they pressed to censure Mr. Schiff for what Republicans believe was a politicized impeachment process, and then turned around and impeached Mr. Biden before the House committees investigating the Biden administration and the business interests of Biden family members had finished their work.

Mr. McCarthy told members he was not opposed to eventually carrying out impeachment proceedings against Mr. Biden or one of his cabinet officials, but that he believed a proper investigation must be conducted first.

House speakers often struggle to control their more aggressive members. Speaker Nancy Pelosi, who wielded a renowned control of the House floor, famously could not prevent Representative Al Green, Democrat of Texas, from forcing a vote to impeach Mr. Trump before she was ready to do so.

The House Republicans’ rush to punish Mr. Schiff and Mr. Biden comes a week after Mr. Trump was charged federally over allegations he mishandled classified documents, and a day after the Justice Department announced prosecutors would charge the president’s son, Hunter Biden, with misdemeanor tax crimes. Republicans spent much of Tuesday railing against what they called a “two-tier justice system,” in which the younger Biden was facing penalties they believed were too lenient.

Ms. Luna’s initial effort to punish Mr. Schiff failed last week, when the House voted 225 to 196 to table, or kill, her first resolution. Her original effort called for an ethics investigation into Mr. Schiff and a $16 million fine if he was found to have lied.

The libertarian-leaning Representative Thomas Massie, Republican of Kentucky, was among the Republicans who argued the fine was unconstitutional.

The last member to be censured was Representative Paul Gosar, Republican of Arizona, in 2021, after he posted a manipulated video on his social media depicting himself killing Representative Alexandria Ocasio-Cortez, Democrat of New York, and attacking Mr. Biden.