My apologies to J. Edgar Hoover. Trying to illustrate the arrogance and treachery of James Comey, I dubbed him J. Edgar Comey and accused him of learning the art of dirty tricks from the FBI’s legendary director.

I was wrong. Hoover, for all his huge flaws, took most of the dirt he collected to the grave. Comey is emptying his closet just to make a buck.

Even worse, we now know that Comey led an FBI that was corrupted to the core by politics and self-dealing.

Comey’s memoir is a going-out-of- business sale where all the remaining merchandise is tawdry. Most striking is that he offers no proof for his cascade of claims against both President Trump and former Attorney General Loretta Lynch.

Instead, he relies on subjective assertions and opinions rather than facts or evidence. His feelings about the base motives of other people, contrasted with his own high-mindedness, are the driving force of his book, as detailed by reviews and news reports.

As The New York Times puts it, “A Higher Loyalty” features “near-cinematic accounts of what Comey was thinking” during meetings with the president.

Chris Wallace of Fox News says he is surprised at how “bitchy” the book is.

Why surprised? Comey’s career has been one long ode to himself that Trump interrupted.

The book’s virtues emerge despite the author’s intent. Inadvertently, Comey proves two very important things.

First, that Trump was right to fire him. Had the president not acted, the FBI still would be headed by a snake who took notes to be used only in the event he was fired. First he leaked them to the media, and now turns them into an embellished book. No honor there.

Second, Comey validates the allegations that he and the FBI abused their powers to play politics during the 2016 campaign.

For example, Comey writes that he felt confident reopening the Hillary Clinton e-mail probe 11 days before the election because he ­assumed Clinton would win.

“It is entirely possible that, because I was making decisions in an environment where Hillary Clinton was sure to be the next president, my concern about making her an illegitimate president by concealing the restarted investigation bore greater weight than it would have if the election appeared closer or if Donald Trump were ahead in all polls,” Comey writes.

In other words, he might have taken a different action if the polls showed Trump in front. That’s a damning admission — and not just about himself.

It is now beyond dispute that Comey created a snake pit of self-aggrandizing officials at the top of the FBI whose legacy is one of misconduct and perhaps criminality.

His book appears simultaneously with a scathing report from the Justice Department’s inspector general on Comey’s former deputy, Andrew McCabe, who was fired for leaking to the media and then lying about it repeatedly to investigators. If there is any justice left in the Justice Department, McCabe will face prosecution.

Indeed, why hasn’t he been charged already? Where in the world is Attorney General Jeff Sessions?

The report, which includes Comey and McCabe contradicting each other and McCabe’s lawyer mocking Comey’s “white knight” stature on the subject of leaks, further scandalizes Comey’s leadership.

And the McCabe report reveals just part of the rampant wrongdoing among Comey’s team while it was investigating both Trump and Clinton.

Recall that top officials Peter Strzok and Lisa Page talked of an “insurance policy” in the event Trump won the election and hinted in texts that the probe of Clinton was rigged.

Yet even at this late date, Congress and lawsuits from Judicial Watch have been able to pry loose only a fraction of the evidence, as both the FBI and the Justice Department sit on a mountain of information that would reveal the full scope of officials’ misbehavior.

Against that backdrop, Comey’s reemergence is a reminder that the resistance to Trump was not limited to noisy street marches. Like so many of the Trump-hating tribe, he reflects the sense of moral superiority, as when he compares the president to New York mob bosses.

His demonization echoes Clinton’s “deplorables” comment that reflected her disdain for the 63 million American citizens who voted for Trump. We hear the same sneering in the catcalls from former CIA director John Brennan, a bleacher bum whose unprecedented attacks on Trump show how espionage was politicized under Barack Obama.

Unfortunately, there is mounting concern that special counsel Robert Mueller also has succumbed to Trump Derangement Syndrome. Apparently unable to find any Trump collusion with Russia, his initial assignment, Mueller and his handler, Deputy Attorney General Rod Rosenstein, authorized a highly unusual raid on Trump’s lawyer, Michael ­Cohen.

Leaks say agents were looking for records of hush-money payments to women who said they had affairs with Trump and another man, along with possible evidence of bank fraud and records of Cohen’s taxi-medallion business.

Hush money for sex is headline-grabbing, but unless there is a Russia thread, we must consider whether Mueller is determined to get the president, no matter how far afield he must go.

Normally, civil-liberties groups concerned about prosecutorial overreach would sound alarms. But with Trump as target, it’s ­silence or applause.

That’s the end product of the twisted logic of those who believe with religious-like fervor that Trump is unfit, and therefore any and all means to bring about his ­removal are fair.

For sure, Trump challenges the ­nation’s norms. His personality, history and habits are unlike any ever seen in the Oval Office.

But unlike those who demand his head, Trump has one advantage: He was elected. And in trying to remove him with a double standard of justice, his enemies are playing a dirty and dangerous game.

Union machine

Headline: Europe might grant robots legal status

Future headline: Robots form union and demand six weeks of vacation.

Taste of bias

The Annals of Bigotry.

That summarizes a New Yorker magazine piece that labels Chick-fil-A’s expansion into the city a “creepy infiltration.”

Writer Dan Piepenbring is upset at the chain’s “pervasive Christian traditionalism,” including the Bible verses and a Jesus statue at its Atlanta headquarters.

Funny, I don’t recall the magazine being upset at the religious nature of Kosher markets or Halal food carts. Only Christians need not apply.

Speaker’s bad call

Paul Ryan’s decision not to seek another term in the House is understandable, but not so his decision to remain Speaker until he leaves office.

As a lame duck, Ryan is not likely to accomplish anything the rest of the year and his status will be a drag on the campaign trail as the GOP fights to hold the House.

A new Speaker could change that dynamic in a heartbeat, which is why Ryan should call immediately for an election to find a replacement. Then he can coast through his final term without penalizing his party.