“The truth is that both candidates have said some incredibly offensive and toxic things,” Mr. Scott said. “I don’t defend, one iota, any of the indefensible, disgusting things that Donald Trump has said. I just simply make sure that I do my research to understand the offensive, troubling things that Hillary Clinton has said as well.”

Mr. Scott, 51, cannot be any more different than Mr. Trump, in background or demeanor. He was raised in poverty by a single mother; he credits her and a white Chick-fil-A franchise owner he befriended as a young man with instilling in him the conservative values he has relied upon as he charted his political rise.

An evangelical Christian, soft-spoken and typically friendly with political allies and opponents, he has long espoused a worldview consistent with Republican orthodoxy, favoring low taxes, small government and a central role for religion in the public sphere.

Before being appointed to an open Senate seat by Gov. Nikki Haley, also a Republican, in 2012, he had served on the Charleston County Council, in the State Legislature and in the United States House of Representatives. He was elected in 2014 to finish out the Senate term that had been vacated by Jim DeMint.

In July, after an African-American vigilante shot a number of police officers in Dallas in apparent response to the police shootings of black men around the country, Mr. Scott delivered a trio of speeches on the Senate floor. He praised police officers as heroes, but also acknowledged a “trust gap” between the police and blacks — and said that during one year, while he was an elected official, he was pulled over seven times by the police.

Mr. Scott is running for re-election, though he does not face much of a contest. His Democratic opponent, Thomas Dixon, is an ex-convict, a recovering drug addict and a political neophyte in a deeply red state where voters have not ousted a sitting senator since 1930.

Still, Mr. Dixon has jumped on Mr. Scott’s simultaneous criticism of and support for Mr. Trump. This summer, after Mr. Scott called Mr. Trump’s comments about a judge of Mexican heritage overseeing a lawsuit involving Mr. Trump “racially toxic,” Mr. Dixon, in a prepared statement, said: “Apparently, Senator Scott thinks it’s O.K. to support a candidate for president who says racially toxic and sexist things from time to time.