Former President Donald J. Trump’s speech on Wednesday in Asheville, N.C., his first event in a battleground state in nearly two weeks, was supposed to offer him a bit of a reset after his Democratic opponent, Vice President Kamala Harris, gained significant momentum.

His top advisers have urged him to focus on policy issues, and he vowed to about 2,000 people in an Asheville auditorium that he would do just that, giving a speech that he said would focus squarely on the economy and inflation.

But in a speech lasting more than an hour, Mr. Trump often veered far from that aim. He jeered President Biden over being pressured to exit the race, frequently criticized the Biden administration’s immigration policy, broadly attacked undocumented immigrants as criminals and lobbed a series of personal attacks at Ms. Harris, whom he claimed had been chosen after Democrats “decided to get politically correct.”

“Her laugh is career-threatening,” Mr. Trump said of Ms. Harris, adding: “That’s a laugh of a person with some big problems.”

Mr. Trump did spend considerable time discussing economic issues, largely reassigning to Ms. Harris attacks he has made for years against Mr. Biden over his inability to curb inflation and price increases. He argued that she had been in a position to address both issues but had not made significant progress.

“Just remember, she goes to work every morning in the West Wing,” Mr. Trump told the crowd. “Her desk is 10 steps from the Oval Office.”