The news comes in the wake of an ongoing scandal following the publication of a video featuring Ekeroth and party colleagues in a drunken and racist tirade.
“It's my firm belief that the Sweden Democrats proposals of extensive reforms in legal policy are critical parts in the building of a better society,” Ekeroth wrote in a statement, according to the TT news agency.
“Due to my misguided behaviour one night two and a half years ago, I realize that I am not the most reliable person to represent the party in these questions.”
Ekeroth added that he would not be granting any interviews.
Sweden Democrat party secretary Björn Söder welcomed Ekeroth's decision to step down:
“I think with his decision he has demonstrated introspection and good judgement, and he will now devote his time to building up the trust in the party again,” Söder told TT.
His resignation comes after the Expressen newspaper published a video filmed by Ekeroth, which shows former party economic policy spokesman Erik Almqvist and Stockholm city councillor Christian Westling hurling racist abuse at passersby in central Stockholm in 2010.
The video continued to show the trio picking up iron pipes, seemingly to be used against a man they had argued with earlier that night.
Almqvist and Westling both resigned last week as Swedish media was consumed by the incident, dubbed SD-Gate by some in the press.
On Tuesday, Chief Prosecutor Mats Åhlund launched a formal investigation into whether the three politicians are guilty of racial agitation (hets mot folkgrupp), a crime punishable by up to two years in prison.