Ahead of his customary Thanksgiving week at Mar-a-Lago, Mr. Trump reserved multiple nods for his new home and the weight it will bear on his push to win re-election. He highlighted efforts by his administration and its Republican allies in Florida to repair military bases devastated by hurricanes and to protect the state’s beaches from an infestation of poisonous algae known as red tide. He also showered the state’s Republicans with praise. (Introducing Gov. Ron DeSantis, Mr. Trump observed that “I always thought Ron was a little bit heavy,” but after seeing Mr. DeSantis shirtless, decided that “this guy is strong.” The governor’s office clarified that Mr. Trump had seen Mr. DeSantis jacketless, not shirtless.)

Sign up for On Politics to get the latest election and politics news and insights. Sign up for our politics newsletter

The president also vowed to “oppose the horrors of socialism in America,” a message intended to resonate in a community built in part by those who fled communist governments in Latin America and one that brought the crowd to its feet.

During the nearly 90-minute speech, Mr. Trump frequently toggled between promoting his administration’s accomplishments and airing his grievances with his Washington adversaries. Tossing a few “Make America Great Again” hats into the crowd at the beginning of the rally, he treated the attendees as confidants. Mr. Trump wrapped them into the “fight to take our country back” and waxed nostalgic about his 2016 victory, his inaugural parade and the days when the news media did not scrutinize his every move.

“Can I be honest, in front of these fakers back there?” Mr. Trump asked the crowd, which responded with a variety of gestures in the direction of the media pen. He painted a world in which he and the audience united once more in 2020 to fight back against a number of adversaries, including those who wanted to stop saying “Happy Thanksgiving.” (It was unclear who those people were and what they wanted to say instead.)

Even as he reminisced about his victories over the Bush and Clinton dynasties, he would pivot midthought to lament the distortion of his “perfect phone call” with Ukraine’s president and the “very sick and corrupt people” investigating his administration. But, he assured the crowd, they would ultimately be unsuccessful.

“A lot of bad things are happening to them — you see what’s happening in the polls?” he said.

Ultimately, Mr. Trump returned to what was ostensibly his core reason for being in Florida: cajoling the cheering crowd into turning out to vote next November and solidifying enough Republican support in the state’s electorate to earn a second term.

“We have the greatest base in the history of politics,” he told the crowd. “You went to great colleges, you people are successful as hell, you’re better looking.”

“If they’re elite,” he added, “then we’re the superelite.”

Patricia Mazzei contributed reporting from Miami, and Maggie Haberman from New York.