The seven-year sentence — to which Shkreli listened impassively — was significantly higher than the 18-month maximum requested by defense lawyers.
"He has the potential to do good," Brafman argued, citing Shkreli's intellectual brilliance and altruism toward others less fortunate than himself.
"He shouldn't be sentenced simply for being Martin Shkreli."
While Brafman did not get what he wanted, the sentence was also less than half the minimum 15-year term that prosecutors said they wanted Friday from Matsumoto.
"We do believe the public needs to be protected from Mr. Shkreli," assistant U.S. Attorney Jacquelyn Kasulis told Matsumoto while arguing for that stiff term.
"We do believe, your honor, that he is dangerous," Kasulis said.
Matsumoto said she had struggled over what to give Shkreli as a sentence.
In a lengthy lead-up to announcing her decision, the judge noted Shkreli's upbringing in a household that included an abusive father, his problems with panic attacks, his charitable contributions to individuals and groups, and his talent for picking stocks and for scientific research.
But Matsumoto also detailed Shkreli's years-long series of sophisticated financial deceptions, his foul-mouthed boasts of having threatened to render a former employee and his family "homeless," and his emailed statements from prison saying he would do anything necessary to win a light prison term.
She urged Shkreli to continue teaching inmates math, finance and other subjects, as he has in recent months.
"I do wish you well, Mr. Shkreli," Matsumoto said.
"Thank you very much, your honor," he responded.
Shkreli, who will get credit for six months he has already spent in jail since shortly after his conviction, also was sentenced to three years of probation after his release and ordered to pay a $75,000 fine.
There is no parole in the federal prison system, but Shkreli could be released after having served almost six years, due to credit for good conduct.
The judge had already ordered Shkreli, who will turn 35 on March 17, to forfeit nearly $7.4 million to the federal government.
And she ordered him to obtain mental health counseling while on probation.
A psychological examination of Shkreli performed before his sentencing found that he suffered from generalized anxiety disorder, major depressive disorder and an unspecified personality disorder.
Shkreli also had revealed that he was drinking seven to eight alcoholic beverages per day after he was indicted in the case in late 2015 to deal with his anxiety. He called that "toxic behavior," the judge noted.
After his release into probation, Shkreli will be barred from holding a majority stake in a company, as well as an executive position or directorship of a company.