Since being charged, Cohen has become an opponent of the president, a stark difference from the days when he vowed to take a bullet for President Donald Trump and worked behind the scenes to fix Trump's problems.
Trump responded by attacking his former lawyer, tweeting that "if anyone is looking for a good lawyer, I would strongly suggest that you don't retain the services of Michael Cohen!"
The downfall of their relationship was marked by porn star Stormy Daniels suing Cohen and Trump over a secret agreement in which she agreed to stay silent about an affair she had with the president for $130,000.
Pointing to the media, Mr Trump said he would use the original phrase, except for the media. "I don't think the heat really was very hot".
WATCH: Trump defends holding rally as Hurricane Michael devastates southeastern U.S. He's faced withering criticism over his handling of the response to that storm, with critics saying he didn't pay enough attention.
Earlier in the day, Trump received a hurricane briefing at the White House on the Category 4 storm.
On Wednesday, Trump touted two Republican congressmen, Mike Kelly and Lou Barletta. Bob Casey. The president, who attended a fundraiser before the rally, also praised GOP gubernatorial candidate Scott Wagner.
After his comments about the hurricane, Trump pivoted to the midterms, celebrating Kavanaugh's appointment despite Democratic opposition and sexual misconduct allegations against him.