Against the backdrop of a sitting president relinquishing his candidacy , Kamala Harris and Donald Trump escalated attacks on each other, setting up a brutal election campaign with either side painting the other as a threat to the country’s future.

Both Harris and the former president held events Wednesday, looking to make their case to the American people as the latest polls show a close contest —something the Trump campaign dismissed as a brief “honeymoon” for Harris.

Harris criticized Trump for handpicking three Supreme Court justices “because he intended for them to overturn Roe v. Wade. ” Trump, in his first rally since Biden dropped out of the race, called Harris “a radical left lunatic who will destroy our country.”

Wednesday’s three-way montage of a lame-duck president, a vice president thrust to the top of the ticket overnight, and a recently shot former president seeking a comeback captured this remarkable moment in politics and the Democratic campaign that is suddenly invigorated by recent shake-ups.

Biden told the nation from the Oval Office that he left the race to defend democracy and that “the best way forward is to pass the torch to a new generation.” In his remaining time in office he said he would focus on several issues, including lowering costs and growing the economy.

Harris, meanwhile, was in Indianapolis, where she called on thousands of members of the Zeta Phi Beta sorority to mobilize voters ahead of the November election, pointing to the group’s history of advocacy on behalf of Black women. Zeta Phi Beta is one of the “Divine Nine,” a group of historically Black sororities and fraternities that includes Harris’s sorority, Alpha Kappa Alpha. On Thursday morning, Harris is scheduled to deliver a keynote address at the American Federation of Teachers’ 88th national convention in Houston.

“In this moment, our nation needs your leadership once again,” she told the sorority. “In this moment, I believe we face a choice between two different visions for our nation: one focused on the future, the other focused on the past .” She said she would sign legislation to restore abortion rights.

Harris said that as president she would invest in affordable child care, eldercare and paid family leave, while Trump, she argued, would take the country back. The vice president pointed to Project 2025 , a vision for the next Republican presidency that outlines conservative goals, put forward by some former Trump administration officials.

Harris called it “a plan to return America to a dark past.”

Trump has repeatedly tried to distance himself from Project 2025, including on Wednesday, when he wrote on social media: “I have nothing to do with, and know nothing about, Project 25.”

Speaking in Charlotte, N.C., later Wednesday, Trump said he “defeated” Biden, calling him “the worst president in the history of our country.”

“He quit because he was losing so badly in the polls, he was down in every single poll and down by a lot, so he quit,” Trump said.

He quickly redirected his speech to focus on Harris, lamenting the media’s focus on her and the enthusiasm of the crowds at her rally, while “they never mentioned our crowds.”

Trump also attacked her as Biden’s “ border czar ” and linked her to everything from high inflation to Russia’s invasion of Ukraine.

He contrasted his views on the economy, abortion and immigration to those of Harris, saying that her “California socialism would kill the American dream.”

Trump said his position on abortion polls better with voters. “That’s because she is so radical,” he said. “She wants abortions in the eighth and ninth month of pregnancy,” he said, a false claim he has repeated on the campaign trail.

​​Harris likely will need to pick her vice presidential running mate by Aug. 7, based on a virtual nomination procedure approved Wednesday by the Democratic National Convention’s rules committee.

Harris’s remarks on Wednesday were the latest in a series of events she’s held focusing on Black voters. Harris’s speech before Zeta Phi Beta was scheduled before Biden’s announcement.

With Trump making inroads with some Black voters, according to polls, Harris had been working to shore up support in the Black community for the Biden campaign.

Since Biden announced his decision to bow out Sunday and Harris became the likely Democratic nominee, Black voters have already shown signs of increased enthusiasm.

A Sunday night video call with Black women leaders had more than 40,000 women join and raised more than $1.5 million, according to the Harris campaign. A separate call on Monday night with Black men had nearly 54,000 attendees and raked in nearly $1.4 million for Harris, her campaign said.

“I think we’re going to see a lot of different women who may not have been engaged before trying to find a way to play a role in a campaign that could be history making,” said Adrianne Shropshire, head of BlackPAC, a Democratic super PAC. “I don’t think that energy is going to be contained to Black women. I think it’s going to be Black people.”

Write to Vivian Salama at vivian.salama@wsj.com and Tarini Parti at tarini.parti@wsj.com