ATLANTA—The state lawmaker who exposed himself and yelled racial slurs on Sacha Baron Cohen’s new cable TV series will resign, according to a spokesman for Georgia House Speaker David Ralston.

Rep. Jason Spencer will step down at the end of the month, spokesman Kaleb McMichen told the Atlanta Journal-Constitution late Tuesday.

In Sunday night’s...