The same day that the fired FBI Director James Comey was set to appear in a long-awaited TV interview, he engaged in a back-and-forth slugfest with President Trump Sunday on Twitter.

Plugging his new book, “A Higher Loyalty,” Comey seemed to take a thinly veiled shot at Trump. “My book is about ethical leadership & draws on stories from my life & lessons I learned from others. 3 presidents are in my book: 2 help illustrate the values at the heart of ethical leadership; 1 serves as a counterpoint,” he tweeted. Comey's ABC News interview airs Sunday night.

Comey did not name the three presidents. He served as assistant U.S. attorney for the Eastern District of Virginia starting in 1996 -- while Bill Clinton was president -- before taking over as U.S. Attorney for the Southern District of New York in 2002, during the administration of President George W. Bush. In 2013, President Barack Obama appointed Comey FBI director.

Excerpts from Comey's new book showed how he seemed to pull no punches with Trump. The 6-foot-8 Comey described Trump as shorter than he expected with a “too long” tie and “bright white half-moons” under his eyes that he suggested came from tanning goggles, The Associated Press reported. Comey reportedly also wrote that he made a conscious effort to check the president's hand size, saying it was “smaller than mine, but did not seem unusually so.”

Earlier Sunday, Trump called Comey the FBI's worst leader “in history” and a “slimeball,” in a string of tweets.

“Slippery James Comey, a man who always ends up badly and out of whack (he is not smart!), will go down as the WORST FBI Director in history, by far!” Trump wrote.

He also tweeted that Comey's mishandling of the Clinton email probe showed he deserved “jail” time.

“Unbelievably, James Comey states that Polls, where Crooked Hillary was leading, were a factor in the handling (stupidly) of the Clinton Email probe,” Trump tweeted. “In other words, he was making decisions based on the fact that he thought she was going to win, and he wanted a job. Slimeball!”

Comey, whom Trump fired in May 2017, wrote in his upcoming book that his decisions about restarting the federal probe into Hillary Clinton’s use of private email servers while secretary of state was influenced by her likely winning the 2016 White House race over Trump and that he was concerned about making her a “legitimate candidate.”

Trump tweeted five times Sunday on the issues.

“The big questions in Comey’s badly reviewed book aren’t answered like, how come he gave up Classified Information (jail), why did he lie to Congress (jail), why did the DNC refuse to give Server to the FBI (why didn’t they TAKE it), why the phony memos … ,” Trump also tweeted.

Trump has said he fired Comey because of his handling of the FBI's investigation into Clinton's email practices. Trump used the investigation as a cudgel in the campaign and repeatedly said Clinton should be jailed for using a personal email system while serving as secretary of state.

Democrats, on the other hand, have accused Comey of politicizing the investigation, and Clinton herself has said it hurt her election prospects.

“I never asked Comey for Personal Loyalty,” tweeted Trump, who purportedly asked Comey for a loyalty pledge. “I hardly even knew this guy. Just another of his many lies. His “memos” are self serving and FAKE!”

Comey, who was appointed in 2013 by then-President Barack Obama, wrote that he regretted his approach and some of the wording he used in his July 2016 press conference in which he announced the decision not to recommend charges be brought against Clinton. But he said he believed he did the right thing by going before the cameras and making his statement, noting that the Justice Department had done so in other high-profile cases.

In the book, which hits store shelves April 17, Comey also revealed new details about how the government had unverified classified information that he believes could have been used to cast doubt on Attorney General Loretta Lynch's independence in the Clinton probe.

While Comey did not outline the details of the information -- and claimed he didn't see indications of Lynch inappropriately influencing the investigation -- he said it worried him that the material could be used to attack the integrity of the probe and the FBI's independence.

“Comey throws AG Lynch ‘under the bus!’ Why can’t we all find out what happened on the tarmac in the back of the plane with Wild Bill and Lynch?” Trump wrote in another tweet Sunday, referring to former President Bill Clinton going uninvited onto Lynch’s plane in Arizona and talking to her amid the investigations. “Was (Lynch) promised a Supreme Court seat, or AG, in order to lay off Hillary. No golf and grandkids talk (give us all a break)!”

Fox News' Mike Arroyo and The Associated Press contributed to this report.