The sentence imposed by Pauley was a modest reduction from the four to five years recommended under federal guidelines but still highlighted the seriousness of the charges and possible implications for the president.
He insists he made hush payments to porn stars Stormy Daniels and Karen McDougall, who say they slept with Trump behind Melania's back, at the president's request.
But Mr Trump denies having the affairs.
The Department of Justice announced on Wednesday it had reached a deal with AMI to forego prosecution as long as the company admitted it made the $150,000 payment "in concert with a candidate's presidential campaign, and in order to ensure that the woman did not publicise damaging allegations about the candidate before the 2016 election".
Pauley sentenced Cohen to 36 months for the payments and to two months for Cohen's lies to Congress about a proposed Trump Tower project in Russian Federation.
Cohen, 52, was sentenced on Wednesday and must report to prison by 6 March.
As part of the sentence, the judge ordered Cohen to forfeit$500,000 and pay restitution of almost $1.4 million.
Pauley referred to Cohen's behavior as a "smorgasbord of fraudulent conduct" marked by deception and "motivated by personal greed and ambition". After being sentenced, Cohen walked over to his daughter and kissed her head.
Both women have claimed to have had sexual encounters with Trump before he was the Republican candidate for president and prosecutors have characterised the payments as illegal campaign contributions meant to influence the election.
Cohen, who pleaded guilty to all the charges against him, told the court that he had felt it was his "duty to cover up". Prosecutors said the McDougal payment violated federal law against corporate campaign contributions, while the money that went to Daniels exceeded the $2,700 limit on campaign donations.
'I am committed to proving my integrity and ensuring that history will not remember me as the villain of his story, ' Cohen said, choking up at times while giving his statement.
But last Friday, Mr Mueller's team released a memo alleging he had breached a plea agreement by lying to investigators.
Former Trump national security adviser Michael Flynn, when confronted by the special counsel's office, was quick to co-operate.
Arguing for leniency, one of Cohen's lawyers, Guy Petrillo, said: "He came forward to offer evidence against the most powerful person in the country".
The judge said Cohen's cooperation with prosecutors "does not wipe the slate clean" of his crimes.
Lawyer Lanny Davis, who has advised Cohen, praised Cohen for cooperating and said he would continue to do so. "Mr Trump's repeated lies can not contradict stubborn facts".
Trump and his lawyer Rudy Giuliani have tried to distance the President from the Cohen case, saying he was a confessed liar who could not be trusted.
"Cohen was guilty on many charges unrelated to me, but he plead to two campaign charges which were not criminal and of which he probably was not guilty even on a civil basis", Trump said.
Cohen told the judge just before he was sentenced that loyalty to Trump led him astray.
In an interview with Reuters on Tuesday, Trump denied the payments were campaign contributions.
Trump has denied any collusion with Russian Federation and has accused Mueller's team of pressuring his former aides to lie about him, his campaign and his business dealings.
Like Cohen, the tabloid publisher admitted it was trying to influence the election by protecting Mr Trump from a damaging story. The project was never built.