He tweeted that Mr Comey had “better hope there are no ‘tapes’ of our conversations”, suggesting such tapes, if they existed, might contradict him.
Mr Comey, who had been leading an inquiry into possible collusion between Trump election campaign officials and Russia, was fired on Tuesday.
Mr Trump has insisted Mr Comey told him that he was not under investigation.
Once over dinner and twice over the phone, Mr Comey had told him he was not a target of the inquiry, the US president said.
Mr Trump also said this week that he alone was responsible for the decision to sack Mr Comey, calling him a “showboat” and “grandstander”.
But this explanation appeared to undermine earlier comments from administration officials that Mr Comey had been fired on the recommendation of Attorney General Jeff Sessions and his deputy Rod Rosenstein.
The first line of Mr Trump’s letter sacking Mr Comey refers to a memo written by Mr Rosenstein and says: “I have accepted their recommendation”.
But he later told NBC he was “going to fire him regardless of the recommendation”.