Donald Trump claimed his former personal lawyer was "making up stories" and that the campaign violations he pleaded guilty to were not crimes.
Cohen, his longtime personal attorney, claimed the US president ordered him to break the law by paying hush money to a porn star, and a former Playboy model, before the 2016 US election.
Mr Trump lashed out at Cohen on Wednesday, accusing him of making up "stories" to get a "deal".
In contrast, Mr Trump said he felt "very badly" for Paul Manafort, his former campaign chairman, who was found guilty of eight charges in a separate fraud trial in Alexandria, Virginia, where he could face up to 80 years in jail.
I feel very badly for Paul Manafort and his wonderful family. “Justice” took a 12 year old tax case, among other things, applied tremendous pressure on him and, unlike Michael Cohen, he refused to “break” - make up stories in order to get a “deal.” Such respect for a brave man!— Donald J. Trump (@realDonaldTrump) August 22, 2018
If anyone is looking for a good lawyer, I would strongly suggest that you don’t retain the services of Michael Cohen!— Donald J. Trump (@realDonaldTrump) August 22, 2018
Mr Trump's tweet on Wednesday raises the possibility he is considering pardoning Manafort.
Cohen pleaded guilty in a New York court to breaking campaign finance laws, and claimed he did so "in coordination with and at the direction of a federal candidate". His lawyer later confirmed he was referring to Mr Trump.
Michael Cohen plead guilty to two counts of campaign finance violations that are not a crime. President Obama had a big campaign finance violation and it was easily settled!— Donald J. Trump (@realDonaldTrump) August 22, 2018
Cohen has also raised the possibility that he will testify against his former boss to the Russia investigators, with his lawyer saying his client was ready to "tell everything about Donald Trump that he knows".
The lawyer, Lanny Davis, claims Cohen has knowledge of whether Mr Trump knew in advance about the computer hacking which undermined his opponent, Hillary Clinton.
Mr Trump was defiant at a campaign rally on Tuesday night, just hours after former senior staff became convicted criminals within an hour of each other
"What we're doing is winning," Mr Trump told cheering supporters in West Virginia, where he largely ignored the jarring back-to-back blows.
"Where is the collusion?" he demanded, underscoring that Manafort's crimes had occurred before he became involved with the Trump campaign. "You know they're still looking for collusion."
The president did say he felt "badly for both" men, but he largely ignored Cohen's guilty pleas to eight felonies.
For Mr Trump by far the most potentially damaging case was that of Cohen, a man who once said he would "take a bullet" for the president.
Cohen's campaign finance violations related to a $130,000 payment made to porn actress Stormy Daniels, and another $150,000 one to ex-Playboy model Karen McDougal.
Both women claimed to have had affairs with Mr Trump, which he has denied.
Cohen's lawyer says Trump just as culpable
Cohen said the payments were made "at the direction" of Mr Trump.
He said he acted "at the request of the candidate" and added: "I participated in the conduct for the purposes of influencing the election."
Cohen agreed a plea deal for those offences, and other bank and tax fraud offences, which will mean he serves between 46 to 63 months.
Legal analysts said Cohen was effectively identifying Mr Trump as a co-conspirator in his campaign finance offences.
Lanny Davis, Cohen's lawyer, said: "Today he stood up and testified, under oath, that Donald Trump directed him to commit a crime by making payments to two women for the principal purpose of influencing an election.
"If those payments were a crime for Michael Cohen, then why wouldn't they be a crime for Donald Trump?"
He later said: "This is a new beginning for Michael Cohen, his chance to tell the 'rest of the story'.”
Mr Davis said a key factor in Cohen's decision to turn on the president had been Mr Trump's press conference in Helsinki with Vladimir Putin.
He said: "I can tell you that Helsinki was a significant turning point as he (Cohen) worried about the future of our country,"
Mr Davis said Cohen had been alarmed when he saw the president "aligning" with Mr Putin and "that shook up Mr Cohen".
He added: "From taking a bullet for Donald Trump, in the statement that he made, to seriously worrying about his unsuitability as president after he became president...it was an evolutionary process, a painful process."
US Justice Department guidelines say a sitting president cannot be charged, although the US Supreme Court has never ruled on the matter.
"I'm assuming he's not going to be indicted because he's a sitting president," Sol Wisenberg, who conducted grand jury questioning of President Bill Clinton during the Whitewater investigation, said of the plea bargain.
"But it leads him closer to ultimate impeachment proceedings, particularly if the Democrats take back the House."
Rudy Giuliani, the president's current lawyer, said: "There is no allegation of any wrongdoing against the president in the government's charges against Michael Cohen.
"It is clear that, as the prosecutor noted, Mr Cohen's actions reflect a pattern of lies and dishonesty over a significant period of time."
Deputy US Attorney Robert Khuzami said Cohen had "worked to pay money to silence two women who he believed had information that would be detrimental to the campaign".
The plea deal reportedly did not involve a commitment for Cohen to co-operate with Robert Mueller, the special counsel investigating links between Mr Trump's campaign and Russia. However, it did not preclude him doing so.
Michael Avenatti, the lawyer for Daniels, said he was certain Cohen would co-operate with prosecutors.
Daniels said she and her lawyer feel vindicated and look forward to apologies "from the people who claimed we were wrong."
Mr Avenatti said he' would renew efforts to get Mr Trump to submit to a deposition in a lawsuit Daniels filed to invalidate a nondisclosure agreement she signed ahead of the 2016 election.
He tweeted that the Cohen pleas should "permit us to proceed with an expedited deposition of Trump under oath about what he knew, when he knew it, and what he did about it".
Cohen, in a dark suit and yellow tie, entered the Manhattan court trying to seem upbeat - smiling at his legal team, and turning to wink at a friend in the front row.
Cohen spells out guilt in court
Asked by Judge William Pauley whether he was fit to enter a plea, and whether he had consumed any drugs or alcohol in the previous 24 hours, Cohen replied: "Yes. Last night at dinner I had a glass of Glenlivet, 12 years old, on the rocks." The court laughed.
But when Judge Pauley turned to the substance of the charges, spelling out the implication of Cohen's guilty plea, his sunny front disintegrated.
Cohen, his voice quavering, said he understood. His lawyer, Guy Petrillo, rubbed his shoulder to comfort him.
He then stood to address the court and spell out his guilt on each count.
Turning to counts seven and eight, involving payoffs to the two women who allegedly had affairs with Mr Trump, Cohen said he did so "in coordination with and at the direction of the candidate."
As the public and press exchanged astonished glances, Cohen repeated his accusation, stating he made the payment "at the request of the candidate".
He said: "I took part for the principal purpose of influencing the election."
Judge Pauley said he accepted Cohen's guilty plea, and sentencing will take place on December 12.
After the court hearing, which ended with Cohen released on $500,000 bail, the lawyer wiped away tears as he gazed out a courthouse window. He left the building and headed straight for a black SUV with tinted windows. A couple of people outside chanted, "Lock him up!" as they recorded the scene with their phones.
Prosecutors had been investigating Cohen for possible fraud related to his businesses for months.
The FBI raided his home, office and hotel room earlier this year. Millions of dollars of loans for his taxi business were reportedly one focus of the investigation.
Cohen was known as one of Mr Trump’s most loyal public defenders. The president has fumed publicly about the raid, branding it "a witch hunt," an assault on attorney-client privilege and a politically motivated attack by enemies in the FBI. But privately he has worried about what information Cohen may have after working for the Trump Organization for a decade.
But in recent months he appeared to have cut ties with the president, and a potentially damaging leaked recording of a conversation he had with Mr Trump was made public.
That prompted speculation that, to save himself, Cohen might be willing to tell prosecutors some of the secrets he helped Mr Trump keep.
Cohen was part of Mr Trump's inner circle for more than a decade, working as his personal lawyer at the Trump Organisation and continuing to advise the president after the election.
The lawyer had been under investigation for potential tax and bank fraud, possibly exceeding $20 million, through loans obtained by the taxi business he owns with his family.
Guilty pleas are common in the US when it appears prosecutors have sufficient evidence for a conviction if the case goes to trial.
Manafort had pleaded not guilty to 18 counts of financial crime.
He was convicted of two counts of bank fraud, five counts of tax fraud and one charge of failing to disclose foreign bank accounts.
Trump calls Manafort case a 'disgrace'
Prosecutors had claimed Manafort received $60 million for political consulting and lobbying work in Ukraine but failed to declare a high percentage of it to the taxman.
The 69-year-old was further accused of lying to banks to obtain millions more in loans after his employers, the pro-Russian party of Ukrainian President Viktor Yanukovych, lost power in 2014, and his income rapidly depleted.
As he was led out of the court room to return to his prison cell, he turned and winked at his wife Kathleen - a daily habit throughout the trial.
Mrs Manafort also showed no reaction as she left the court room, although the family spokesman put his arm around her to comfort her earlier in the day.
Judge TS Ellis, who has presided over the case, told Manafort he would order a pre-sentencing report before setting a date for his sentencing.
Manafort will have an opportunity to address the court before a sentence is imposed, he said.
Mr Trump, arriving in West Virginia for a rally on Tuesday night, tried to distance himself from Manafort's conviction, saying it did not involve him.
He said: "Paul Manafort is a good man. It doesn't involve me, but I still feel - you know, it's a very sad thing that happened.
"This has nothing to do with Russian collusion. This is a witch hunt and it's a disgrace."