The circumstances aren't as simple as the president suggests, however. The question of attorney-client privilege came up almost immediately after reports surfaced Monday that the FBI raided Cohen's office and residence. Investigators must clear a high legal standard if they want to secure a search warrant for a lawyer's office, according to Justice Department guidelines.

Jonathan Ernst | Reuters

President Donald Trump delivers remarks on the U.S. opioid crisis, at Manchester Community College in Manchester, New Hampshire, March 19, 2018.

Another key exception for attorney-client privilege is when a lawyer and his or her client collude on potential crime or fraud.

"The purpose of this exception is to assure that the secrecy between lawyer and client does not extend to obtaining advice in furtherance of contemplated or ongoing criminal or fraudulent conduct," attorney and MSNBC contributor Danny Cevallos wrote in a legal analysis for NBC News.

Cohen is reportedly being investigated in a probe related to bank fraud and campaign finance violations. The FBI is seeking evidence related to the payment Cohen made to porn star Stormy Daniels on the eve of the 2016 presidential election.

The raids came after federal prosecutors in New York obtained a search warrant following a referral from special counsel Robert Mueller, Cohen's lawyer said.

Trump's tweet came on the morning after a White House event at which he ripped into the entire special counsel investigation, his own attorney general and what he described as a lack of focus on former presidential opponent Hillary Clinton, calling it a "disgraceful situation."

He also appeared to entertain the notion of firing Mueller. "Many people have said, 'You should fire him.' Again, they found nothing," the president said of the special counsel and his team.

"It's a total witch hunt," Trump added. He repeated the sentiment in another tweet Tuesday morning.