The politician, who is from a municipality in Värmland, was relieved of his political duties after posting on Facebook a picture with the accompanying text “Christer Pettersson, where are you when Sweden needs you?”
Christer Pettersson was in 1988 convicted for the murder of Palme, but was acquitted on appeal the following year.
Palme, a Social Democrat prime minister who was in office from 1969-76 and from 1982 until his death, was assassinated in February 1986 after being fatally shot in the back.
The Facebook post in question was made after the confirmation of Stefan Löfven, also a Social Democrat, as prime minister after a parliamentary vote on Friday.
The SD politician is reported to have told broadcaster SVT that he meant the post as a joke, but the local party leadership appears to have taken the matter seriously.
In a press statement, SD district chairperson Runar Filper wrote that he had spoken to the local politician behind the post, and agreement had been reached for his political assignments with the party to be terminated.
“He accepts the consequences of this inappropriate and ill-advised Facebook post and is leaving politics with immediate effect,” the press release stated.