JACKSON, Miss.—Sen. Cindy Hyde-Smith on Tuesday apologized for recent remarks she made that evoked Mississippi’s history of lynchings but accused her opponents of using her words as a “political weapon,” seeking to allay Republican concerns that the last contest in the 2018 midterm elections may wind up too close for their comfort.

Mike Espy, her Democratic opponent, responded during the lone televised debate of their Senate campaign that “no one twisted your comments,” adding bluntly, “they came out of your mouth.”

“I don’t know what’s in your heart but we all know what came out of your mouth,” said Mr. Espy, a former Clinton cabinet official and congressman seeking to become the state’s first black senator since Reconstruction. “It’s given our state another black eye that we don’t need. It’s just rejuvenated the old stereotypes that we don’t need anymore.”

Republicans control 52 Senate seats after Gov. Rick Scott won Florida’s Senate race, and a GOP victory would give Mr. Trump’s party a 53-47 Senate advantage following midterm elections that saw Democrats retake control of the U.S. House.

Mrs. Hyde-Smith was appointed by Gov. Phil Bryant to fill the seat of Republican Sen. Thad Cochran, who announced his retirement in March because of health concerns. Both candidates received about 41% in the four-person race on Nov. 6, forcing a runoff when neither crossed the threshold of 50%. The winner will serve the final two years of Mr. Cochran’s six-year term.