Trump accused him of positioning himself to get a job with Hillary Clinton if she won the presidency.
He questioned Comey's intelligence and place in history, writing, "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!"
The president's sharp remarks came hours ahead of Mr. Comey's first major news media appearance since being fired by President Trump a year ago.
James Comey is embarking on a publicity tour. In it, Comey wrote that Trump, in a private meeting, pressed the then-FBI director for his loyalty. Trump fired Comey in May.
Comey, who was sacked by Trump past year, told ABC that a desire to ensure that Clinton's victory was seen as legitimate played a role in his decision to announce the bureau would reopen the investigation, made 11 days before the election. "The 6'8" Comey says Trump appears shorter in person. The interview kicks off a media blitz by Comey to promote the release of his book.
Reuters and other news outlets have obtained copies of Mr Comey's book before its formal release this week.
The president insisted Comey is a "leaker and a liar" and called for him to be prosecuted for leaking "classified" information.
"I don't remember consciously thinking about that", Comey said, "but it must have been".
He is the second ever Federal Bureau of Investigation director to be fired.
Trump's had a very bad week - his personally attorney's office and house was raided.
Trump tweeted six times Sunday on the issues.
Trump has called the special counsel probe a "witch hunt" and repeatedly insisted there was no collusion between his campaign and Russian Federation. Moscow has denied meddling. Clinton herself has pointed to Comey's actions in explaining her presidential election loss. Like so numerous Trump-hating tribe, he reflects the sense of moral superiority, as when he compares the president to NY mob bosses.
Trump denied the allegations and said he might want the FBI to investigate allegations in the dossier to prove they were untrue, Comey told ABC.
"I said to him, 'Sir that's up to you but you want to be careful about that because it might create a narrative that we're investigating you personally and, second, it's very hard to prove something didn't happen, '" Comey said. "It was nearly an out-of-body experience for me". I hardly even knew this guy", Trump wrote in a follow-up tweet, before adding, "Just another of his many lies.