Written by The Wall Street Journal editorial board

President Trump fired James Comey late Tuesday, and better now than never. These columns opposed Mr. Comey’s nomination by Barack Obama, and the Federal Bureau of Investigation Director has committed more than enough mistakes in the last year to be dismissed for cause.

Mr. Trump sacked Mr. Comey on the advice of Deputy Attorney General Rod Rosenstein, a former U.S. Attorney with a straight-up-the-middle reputation who was only recently confirmed by the Senate. In a memo to Attorney General Jeff Sessions, Mr. Rosenstein cited Mr. Comey’s multiple breaches of Justice Department protocol in his criminal investigation of Hillary Clinton’s mishandling of classified material.

The FBI isn’t supposed even to confirm or deny ongoing investigations, but in July 2016 Mr. Comey publicly exonerated Mrs. Clinton in the probe of her private email server on his own legal judgment and political afflatus. That should have been the AG’s responsibility, and Loretta Lynch had never recused herself.

“It is not the function of the Director to make such an announcement,” Mr. Rosenstein wrote. “The Director now defends his decision by asserting that he believed Attorney General Loretta Lynch had a conflict. But the FBI Director is never empowered to supplant federal prosecutors and assume command of the Justice Department.”

Mr. Rosenstein added that at his July 5 press appearance Mr. Comey “laid out his version of the facts for the news media as if it were a closing argument, but without a trial. It is a textbook example of what federal prosecutors and agents are taught not to do.”

Then, 11 days before the election, Mr. Comey told Congress he had reopened the inquiry. His public appearances since have become a self-exoneration tour to defend his job and political standing, not least to Democrats who blame a “Comey effect” for Mrs. Clinton’s defeat. Last week Mr. Comey dropped more innuendo about the Trump campaign’s alleged ties to Russia in testimony to Congress, while also exaggerating the new evidence that led his agents to reopen the Clinton file.

For all of these reasons and more, we advised Mr. Trump to sack Mr. Comey immediately upon taking office. The President will now pay a larger political price for waiting, as critics question the timing of his action amid the FBI’s probe of his campaign’s alleged Russia ties. Democrats are already portraying Mr. Comey as a liberal martyr, though last October they accused him of partisan betrayal.

The reality is that Mr. Comey has always been most concerned with the politics of his own reputation. He styles himself as the last honest man in Washington as he has dangled insinuations across his career about the George W. Bush White House and surveillance, then Mrs. Clinton and emails, and now Mr. Trump and Russia. He is political in precisely the way we don’t want a leader of America’s premier law-enforcement agency to behave.

As for the Russia probe, if Mr. Trump is trying to cover up anything, firing the FBI Director is a lousy way to do it. Such a public spectacle will make details more likely to leak if agents feel their evidence is being sat on. Mr. Comey’s credibility was also tainted enough that whatever he announced at the end of the probe would have been doubted.

As Mr. Rosenstein put it in his memo, “I agree with the nearly unanimous opinions of former Department officials. The way the Director handled the conclusion of the email investigation was wrong. As a result, the FBI is unlikely to regain public and congressional trust until it has a Director who understands the gravity of the mistakes and pledges never to repeat them. Having refused to admit his errors, the Director cannot be expected to implement the necessary corrective actions.”

A new FBI Director who looks at the Russia evidence with fresh eyes and without the political baggage of the last year will have a better chance of being credible to the American people. Mr. Trump should now devote himself to nominating someone of integrity who can meet that standard.