The ex-MP previously pleaded guilty to false accounting by filing 19 fake receipts for "research and translation" services.
MacShane, 65, used the money to fund a series of trips to Europe, including one to judge a literary competition in Paris.
His guilty plea followed more than four years of scrutiny into his use of Commons allowances.
Flanked by two security officers, MacShane, wearing a dark suit with a blue striped tie and glasses, said "Cheers" as the sentence was delivered, before adding, "Quelle surprise" as he was led from the dock.
Mr Justice Sweeney told MacShane his dishonesty had been "considerable and repeated many times over a long period".
"You have no one to blame but yourself," the judge said.
The judge said MacShane had shown "a flagrant breach of trust" in "our priceless democratic system".
"The deception used was calculated and designed," he said.
He told MacShane he must serve half his sentence in prison and was ordered to pay costs of £1,500 within two months.
MacShane was born in Glasgow as Denis Matyjaszek, to an Irish mother, Isobel MacShane, and her Polish husband, Jan Matyjaszek.
Parliamentary authorities began looking at his claims in 2009 when the wider scandal engulfed Westminster, and referred him to Scotland Yard within months.
But the principle of parliamentary privilege meant detectives were not given access to damning correspondence with the standards commissioner in which MacShane detailed how signatures on receipts from the European Policy Institute (EPI) had been faked.
The body was controlled by MacShane and the general manager's signature was not genuine. One message, dated October 2009, said he drew funds from the EPI so he could serve on a book judging panel in Paris.
It was not until after police dropped the case last year that the cross-party Standards Committee published the evidence in a report that recommended an unprecedented 12-month suspension from the House.
MacShane, 65, who served as Europe minister under Tony Blair, resigned as MP for Rotherham last November before the punishment could be imposed.
Police then reopened their inquiry in the light of the fresh information and he was charged in May - even though the letters are still not thought to be admissible in court.
The offence of false accounting covered 19 ''knowingly misleading'' receipts that MacShane filed between January 2005 and January 2008.
The court heard that MacShane incurred "genuine expenses" for similar amounts which he chose to recoup by dishonest false accounting rather than through legitimate claims.
Mr Sweeney said: "However chaotic your general paperwork was, there was deliberate, oft repeated and prolonged dishonesty over a period of years - involving a flagrant breach of trust and consequent damage to Parliament, with correspondingly reduced confidence in our priceless democratic system and the process by which it is implemented and we are governed."
The judge said he had considered a number of mitigating features, including MacShane's guilty plea, and that the offences were "not committed out of greed or for personal profit".
MacShane had suffered "a long period of public humiliation" and carried out the offences "at a time of turmoil" in his personal life, Mr Sweeney said.
The court heard that MacShane and his wife divorced in 2003, his daughter Clare was killed in an accident in March 2004, his mother died in 2006 and his former partner, newsreader Carol Barnes - Clare's mother - died in 2008.
The judge also considered his previous good character and that the money had been paid back.
The court heard that MacShane submitted four of his false claims while serving as Europe minister.
He joins a list of politicians prosecuted as a result of the expenses scandal.
They include fellow former Labour minister Elliot Morley, as well as MPs Jim Devine, David Chaytor and Eric Illsley.
Tories to fall foul of the law were Lord Hanningfield and Lord Taylor of Warwick.
Sentences have ranged from nine to 18 months.
Another ex-Labour MP, Margaret Moran, was spared prison and given a supervision order instead after suffering mental health problems.
Mr Sweeney told MacShane that he acknowledged a difference between his case and other MPs sentenced following the expenses scandal.
However, MacShane "deliberately created misleading and deceptive invoices and then used them in order to procure payments of public money", the judge added.
"You must therefore have been aware throughout that it was an essential feature of the expenses system then in operation that Members of Parliament were invariably treated as honest, trustworthy people, and that the unwritten assumption was that only claims for expenses genuinely incurred in accordance with the rules would be made," Mr Sweeney said.
"Yet you acted in flagrant breach of that trust."