The US president was responding to reports he had been secretly recorded by Michael Cohen discussing payments to a Playboy model, who said she had an affair with Mr Trump.
He tweeted: “Inconceivable that the government would break into a lawyer’s office (early in the morning) – almost unheard of.”
This was a possible reference to an FBI raid on the office of Mr Cohen in April.
He added: “Even more inconceivable that a lawyer would tape a client – totally unheard of and perhaps illegal.
“The good news is that your favorite President did nothing wrong!”
Mr Cohen reportedly taped the discussion about Karen McDougal before the presidential election in 2016, which Mr Trump went on to win.
Ms McDougal has claimed she had an affair with Mr Trump for nearly a year starting in 2006, shortly after Mr Trump’s wife gave birth to their son Barron. Mr Trump denies the affair.
According to the New York Times, the FBI seized the recording during a raid on Mr Cohen’s office in April and its existence will fuel speculation on how much damage Mr Cohen could do to Mr Trump if he cooperates with prosecutors.
Mr Trump’s current lawyer, Rudy Giuliani, told the newspaper the recording was genuine, but said a payment was never made.
Mr Cohen, who is no longer acting for Mr Trump, is being investigated over payments allegedly made to women to silence embarrassing news stories about Mr Trump leading up to the election.
Ms McDougal sold her story to The National Enquirer in the final months of the presidential campaign but the tabloid did not publish it.
The Wall Street Journal revealed, days before the election, that the publication – run by Trump supporter David Pecker – had paid $150,000 (£114,270) to silence Ms McDougal.
In March this year, Ms McDougal sued the Enquirer, asking to be released from their agreement, which was stopping her from talking about the alleged affair.
Earlier this year, porn star Stormy Daniels filed a lawsuit asking a judge to invalidate a non-disclosure agreement preventing her from talking about her alleged affair with Mr Trump.
Ms Daniels described the agreement as “null and void and of no consequence” because Mr Trump did not sign it.
In May, Mr Giuliani told ABC’s This Week programme he had “no knowledge” of whether Mr Cohen had made other payments for the president, but said: “I would think if it was necessary, yes.”
On Friday, he told the New York Times the recording seized by authorities was less than two minutes and demonstrated that the president had done nothing wrong.