Agents seized files relating to Cohen's work, which included making a $130,000 payment before the 2016 election to an adult film actress who says she had a tryst with the Trump a decade earlier.
Cohen's own attorney Stephen Ryan said agents were working in part on the request of Mueller, the independent prosecutor investigating links between Russia and the Trump campaign.
At the White House, Trump angrily denounced the raid on "good man" Cohen.
"It's a disgraceful situation. It's a total witch-hunt, I have been saying it for a long time," he told reporters.
"It's an attack on our country in a true sense. It's an attack on what we all stand for."
The raid came as Mueller's probe intensifies its focus on Trump's inner circle.
Mueller's team is examining possible collusion between Trump's campaign and Moscow, as well as allegations of corrupt behavior by Trump campaign lieutenants and of White House efforts to obstruct the investigation.
So far, 19 people have been indicted, including the chairman of Trump's campaign and his former national security advisor.
Trump accused Mueller of overseeing a biased investigation staffed by Democrats, "a pure and simple witch-hunt."
But the top Democrat on the House Intelligence Committee, Adam Schiff, said it was a Trump-appointed prosecutor who had sought the search warrant, which was in turn approved by a judge.
"That's no witch hunt. That's the rule of law," Schiff tweeted.
"As Trump floats firing Mueller, all Members must speak out - or stop feigning devotion to the Constitution."
The special counsel is also probing a $150,000 payment Ukrainian billionaire steel magnate Victor Pinchuk made during the US presidential campaign to Trump's foundation for the American real estate developer to give a 20-minute speech via video link, according to The New York Times.
- Mueller in firing line? -
After having turned over what he called a million pages of documents, Trump said the investigation is "now getting ridiculous. They found no collusion whatsoever with Russia."
"This is the most biased group of people, these people have the biggest conflicts of interest I've ever seen. Democrats all, or just about all," the president added.
Asked if he wants to fire Mueller, Trump replied: "Many people have said you should fire him. Again they found nothing and in finding nothing that's a big statement," he said. "So we'll see what happens."
The veteran prosecutor, a former FBI director, is seeking to interview Trump, but has not said the president is a target in the investigation.
The raid on Cohen though takes the probe close to the Oval Office. Cohen has been Trump's personal lawyer and confidant for years, helping him on real estate and personal matters, as well as informally advising him since he became president.
He is also known as a rough-and-tumble "fixer" for Trump, dedicated to protecting his boss's interests.
- Raid tied to alleged affair -
Porn actress Stormy Daniels says that Cohen's surreptitious payment aimed to keep her quiet about her earlier relationship with Trump.
The attorney representing the stripper -- real name Stephanie Clifford -- said his client had faced "death threats" over the case.
"The amt of courage and fortitude that my client @StormyDaniels and her family have shown over the last 6 weeks has been remarkable," Michael Avenatti tweeted.
"It takes special people to withstand death threats, turmoil and personal attacks, all in the interest of a search for the truth. #gratitude #justice."
The Washington Post reported that Cohen is under examination for possible bank fraud and campaign finance violations.
Clifford is among several women who claim to have had affairs with Trump in the past and were pressured or paid to keep quiet about them.
Last month, Clifford told 21 million TV watchers that she had unprotected sex with Trump after meeting with him at a celebrity golf tournament in Lake Tahoe, California in July 2006. That was shortly after Trump's wife Melania gave birth to their son.
Trump has skirted questions about the relationship, and last week denied any knowledge of Cohen's payment to secure Clifford's October 2016 signature on a secret agreement to keep quiet about the affair.
But since then, media reports have made it public, and last month she sued in a California court to have the hush deal annulled. Cohen countersued, demanding some $20 million in penalties for her violating the non-disclosure pact.
Cohen has said that neither the Trump Organization, the president's real estate group nor the Trump campaign was a party to the transaction with Daniels.
"Neither reimbursed me for the payment, either directly or indirectly," Cohen said.
Cohen's attorney accused prosecutors of seizing privileged communications between Cohen and his clients in the "completely inappropriate and unnecessary" raid.//AFP