Kevin Rudd retires
Australia’s former Prime Minister Kevin Rudd has retired from politics (YouTube)

Australia's former prime minister Kevin Rudd has retired from politics a few months after losing a bid to be re-elected.

The former Labor party leader announced his decision in an emotional speech to the parliament in Canberra, saying he was quitting politics and his seat as MP for Griffith, Brisbane, to stay closer to his family.

"There comes a time in our lives as parliamentarians when our families finally say enough is enough. And my family has reached just such a time," Rudd said.

"My family have given their all for me in public life, and for the nation; and it is now time I gave something back to them.

"[This] is why I will not be continuing as a member of this parliament beyond this week," Rudd said as he struggled to choke back tears.

Rudd said the decision was "the product of much soul searching for us as a family over the last few months."

Rudd, 56, thanked his many collaborators and friends and said it had been an honour to lead the nation.

Rudd served as prime minster from 2007 to 2010, when he was thrown out of the job by his fellow party member Julia Gillard.

In a dramatic manoeuvre described as "political backstabbing" by commentators he returned the favour in July this year.

Rudd ousted Gillard as Labor leader and replaced her as PM, as opinion polls suggested the party was trailing behind Tony Abbott's Liberal Party a few months before elections.

A September general election saw the Liberal-National coalition led by Tony Abbott elected.

"I wish Tony [Abbott], his wife Margie and their family all the best for the rigours of high office that inevitably lie ahead," Rudd said in his farewell speech.

"On this final occasion in the parliament, and as is now officially recorded in the classics for occasions such as this, it really is time for me to zip," he concluded.