The former London mayor had been suspended from Labour since April 2016 pending an internal investigation.
It followed comments Mr Livingstone made more than two years ago about Hitler, in which he suggested the Nazi leader “was supporting Zionism before he went mad and ended up killing six million Jews”.
In a statement, which he urged his social media followers to share “to help counter media misrepresentation”, Mr Livingstone said: “I do not accept the allegation that I have brought the Labour Party into disrepute – nor that I am in any way guilty of anti-Semitism.
“I abhor anti-Semitism, I have fought it all my life and will continue to do so.
“I also recognise that the way I made a historical argument has caused offence and upset in the Jewish community. I am truly sorry for that.”
However, Mr Livingstone revealed he is quitting as “the ongoing issues around my suspension from the Labour Party have become a distraction”.
He added: “I am loyal to the Labour Party and to Jeremy Corbyn.
“However any further disciplinary action against me may drag on for months or even years, distracting attention from Jeremy’s policies.
“I am therefore, with great sadness, leaving the Labour Party.”
Labour leader Mr Corbyn said Mr Livingstone’s resignation was “sad after such a long and vital contribution to London and progressive politics”, but added it was “the right thing to do”.
Mr Livingstone, a long-time ally of Mr Corbyn on the left of the Labour Party, admitted he was “tipped off” at the weekend that “some of the old right-wingers” on Labour’s ruling National Executive Committee were planning to raise his case again at a meeting on Tuesday.
But, he told Sky News his source “certainly wasn’t” the Labour leader himself.
Mr Livingstone claimed he had been “going mad stuck at home” over the course of his suspension as he had been barred from campaigning for Labour at elections.
“Now I can go out from outside the Labour Party supporting Jeremy and working to get a Labour government,” he said.
Suggesting he has been a victim, Mr Livingstone attacked “fake news” for having “distorted” his comments about Hitler.
“People all round the world being told I said Hitler was a Zionist,” he added.
“If I’d done that, I wouldn’t have just apologised I’d have been off to my doctor to check it wasn’t the sign I was in the first stage of dementia.”
Mr Livingstone claimed his lawyer had told him he had a “99% chance” of winning a court case against his possible expulsion from Labour, “because I simply stated historical fact”.
He said: “Unfortunately, this disciplinary panel structure that was set up under Tony Blair is filled with old right-wingers who have been expelling lefties like me for years.
“Now, Jeremy’s slowly getting a grip on that but it takes a lot of elections to change the balance of that and so this is going to go on.”
Asked if he could reapply to join Labour at a later date, Mr Livingstone replied: “Depends how long I live, doesn’t it? We’ll come back and talk about it in a couple of years.”
Earlier this year, Mr Livingstone had his suspension from Labour extended after further complaints were made about him.
After making his initial comments in April 2016, Mr Livingstone routinely repeated his comments about Hitler in media appearances.
The long-running case became the root of growing criticism of Labour’s internal disciplinary procedures and Mr Corbyn’s commitment to dealing with anti-Semitism allegations within his party.
Labour’s shadow attorney general Baroness Chakrabarti recently hinted she may quit her party’s front bench if Mr Livingstone was not expelled at his next disciplinary hearing.
In March this year, several hundred protesters gathered in Parliament Square in an unprecedented demonstration against anti-Semitism within Labour.
Labour MP John Mann, who famously confronted Mr Livingstone at the time he first made his remarks about Hitler, told Sky News: “He’s avoided the humiliation of being expelled, which was why he’s gone today because he knew that’s about to happen.
“If he’s going to resign, he should have gone two years ago.
“He’s still not withdrawn those deeply offensive remarks he made when he rewrote history, he invented things; his fantasy where he prattled on about a 1932 Nazi Party manifesto that didn’t even exist.”
Wes Streeting, who along with Mr Mann was one of a number of Labour MPs who supported March’s demonstration, said: “Ken Livingstone’s exit from the Labour Party is welcome, but he should have been expelled.
“We must now make it clear that he will never be welcome to return. His vocal cheerleaders and supporters should follow him out the door.”
However, Chris Williamson MP, who has previously spoken of the “weaponisation” of anti-Semitism as a means to attack Mr Corbyn, claimed Mr Livingstone “remains a towering figure of the Labour movement”.
“He popularised progressive socialism and was labelled a ‘Loony Lefty’ nearly 40 years ago for his efforts to champion public services, stand up for marginalised groups and fight all forms of racism,” the former shadow minister added.
Mike Katz, national vice-chair of the Jewish Labour Movement, told Sky News that Mr Livingstone “should have done the right thing and gone a lot sooner” and claimed Labour should have used its internal processes to “expel him a lot earlier”.
He added: “It doesn’t mean the story’s over by any long chalk, we absolutely have to make sure the Labour Party’s made a safe space for all Jewish members, voters and supporters and that means dealing with anti-Semitism in the Labour Party.”
Mr Livingstone was MP for Brent East between 1987 to 2001, before serving two terms as London mayor between 2000 and 2008.
More from Jeremy Corbyn
Jeremy Corbyn dismisses calls to back EEA membership after Brexit
Anger at Labour ‘stitch-up’ over Lewisham East candidate selection
LIVE: ‘UK will not walk away from Iran nuclear deal’
Momentum boss Jon Lansman: Jeremy Corbyn ‘won’t resign before 2022’
Alastair Campbell: Labour is a long way from power
May and Corbyn strike positive note after local elections
In 2006, Mr Livingstone was handed a four-week suspension from the mayoralty after likening a Jewish journalist to a Nazi concentration camp guard.
The suspension was later overturned by a High Court judge.