Prosecutors had recommended that Senior District Court Judge Charles Breyer impose an eight-year sentence, saying that would reflect the extent of Yee's crimes.
RELATED: Former state Sen. Leland Yee prepares for sentencing
Yee's attorneys had called for no more than five years and three months behind bars, saying Yee had a history of public service and his wife was ill. "I don't feel I should be lenient," Breyer said during the hearing. "The crimes that you committed have resulted in essentially an attack on democratic institutions."
Yee, 67, is a long-time politician who also served in the state Assembly and on the San Francisco Board of Supervisors.
He pleaded guilty in July to one count of conspiracy to engage in racketeering. The charge was filed as part of an organized crime investigation in San Francisco's Chinatown that led to charges against more than two dozen people.
RELATED: ABC7 News interviews Raymond "Shrimp Boy" Chow in jail
Last summer while he was out on bail, he pleaded guilty. But Wednesday was Yee's day."I take full responsibility for this. I accept my crimes, I am asking for lenience. I hope you look at my entire life and not just the crimes I committed," he said.
Breyer didn't buy that. "The crimes you committed were an attack on our democratic institutions. Mr Yee, you abused that trust," he said. "These are very serious abuses. The most significant crime was that your vote was for sale."
Yee rushed out of the courthouse with his lawyer Lassart who said: "He's remorseful and he's tired of this humiliation to his family and he's tired of what I would call this circus."
Many of Yee's supporters came to court disappointed at the sentence.
Among them was Nancy Lim Yee, who is not related to him. "You can't discount all the good things he's done over the many years of public service," she said.
The Associated Press contributed to this story.
Click here for more stories on Leland Yee.