The Liberal Democratic nominee for Turrock in Essex stopped after being accused of publishing racist and homophobic tweets 10 years ago.
The screenshots shown to show Kevin McNamara's social media comments circled, prompting him to step down.
Mr McNamara said he was "deeply sorry for the comments I made".
A Liberal Democrat spokesman said: "A disciplinary process has been introduced."
The tweets are said to have been published in 2009 and 2010 and allegedly include racist and homophobic language.
Mr McNamara, who finished fourth in Turquoise in the 2017 election, said: "These words are deeply offensive and I apologize to everyone I have offended with these tweets.
"I would never want to undermine the voices of those communities through blurring or degradation and it is important that people who want to represent the public are held to the highest standard.
"I am resigning as a candidate with immediate effect for the upcoming elections. I apologize to all those I betrayed with my past behavior and will work hard to restore their confidence. "
Mr McNamara is the honorary vice-president of the Liberal Democratic Campaign for Racial Equality and is in fifth place in the 2016 election for police and crime commissioner in Essex.