Spencer, a Republican who has served in the Georgia House of Representatives since 2011, said in a one-sentence email to House Speaker David Ralston that he had chose to step down.
Spencer appears on the show alongside prankster Cohen, who is disguised as an Israeli anti-terrorism expert named Col. Erran Morad.
In a statement Monday, he apologized for the "ridiculously ugly episode", but he initially refused to step down. Originally Spencer said that he would finish out the remaining five months of his term, but apparently the pressure to resign has been too intense.
And finally, Mr Spencer was told he could intimidate terrorists by pulling down his trousers and exposing his buttocks.
The move came after Cohen told him it would incite fear in homophobic jihadists.
Image Capt Erran Morad is one of Baron Cohen's new creations. Pic Showtime
Spencer would have left office at the end of the year anyway.
In a second section called "How to stop a kidnapping" Mr Spencer loudly shouted the n-word several times to "attract attention".
Spencer was accused of being racist and Islamophobic long before his appearance on Cohen's show after he made threatening remarks to a black attorney protesting Confederate monuments and tried to introduce legislation that would have banned women from wearing burqas in public.
David Ralston, the Republican speaker for the state house of representatives had led calls for Mr Spencer's immediate resignation.
Mr Spencer has since apologised for his behaviour and said he "deeply regrets" the language he used.
A one-sentence note from Mr Spencer reads: "This email/letter is to serve as an official resignation notice to your office that I will be resigning my post effective July 31, 2018". "There is no excuse for this type of behavior, ever, and I am saddened and disgusted by it".
Spider-Verse Movie Adds More Spider-Men to Its Roster
On PS4 Pro, users can expect the game to run in 2160p dynamic 4K resolution. Spider-Man is web-swinging to PS4 on September 7.