An Arizona legislator resigned Wednesday amid an ethics investigation into reports that he was charged with sex crimes decades ago. Just months earlier, colleagues had called on him to step down over derogatory remarks he made about black people and immigrants.

The Republican state representative, David Stringer of Prescott, Ariz., came under fire in December after he told university students that black people “don’t blend in” to society like European immigrants and “always look different.” Mr. Stringer refused to resign even though members of his own party called on him to do so.

In late January, Mr. Stringer began to face heightened scrutiny from fellow legislators after a local news outlet, The Phoenix New Times, reported that he had been charged with multiple sex offenses, including child pornography, when he lived in Maryland in the early 1980s.

Mr. Stringer, who could not immediately be reached for comment on Wednesday night, told another local news outlet, Prescott eNews, in January that he had been falsely accused and that there was “no guilty plea, no conviction.” (Mr. Stringer, a lawyer, is an investor in Prescott eNews.)