Mr Salmond posted a statement on his account.
It read: “I have been a member of the Scottish National Party for 45 years, 20 of them as party leader and seven as First Minister of Scotland.
“I hope I have done the party and the broader cause of independence some service.
“But today I have written to the National Secretary of the Party resigning my membership.”.
He goes on to say that he read “carefully” SNP leader Nicola Sturgeon’s statement on Sunday in which she “made it clear that the SNP never received a single complaint about his personal conduct”.
Mr Salmond continued: “And the Scottish Government have confirmed that they did not have any such complaint before this January, more than three years after I left office as First Minister.
“That is a record of 30 years of public service.”
Mr Salmond was accused of sexually harassing two female members of staff during his time as first minister in late 2013. He has denied the allegations made against him.
Police Scotland were handed claims about Alex Salmond’s conduct after he was notified about allegations in March.
The allegations were originally brought to the attention of party officials in January.
One woman has claimed Mr Salmond touched her breast and bottom through her clothes and he only stopped after she told him to multiple times.
He responded by strongly denying the claims saying he has never been a part in any “criminality’.
This is a developing story, more to follow…