Prince Harry appeared alongside dozens of celebrities at the Vax Live event, a charity performance in aid of the international Covid vaccination effort.
Hosted by the singer Selena Gomez, the concert - to be aired on Saturday - featured performances from artists Jennifer Lopez and Foo Fighters.
US President Joe Biden also spoke.
Addressing thousands of fully vaccinated guests at the SoFi Stadium in Los Angeles, Prince Harry praised the efforts of front line workers during the pandemic.
"Tonight is a celebration of each of you here, the vaccinated frontline workers in the audience and the millions of frontline heroes around the world," he said.
"You spent the last year battling courageously and selflessly to protect us all. You served and sacrificed, put yourselves in harm's way, and acted with bravery, knowing the costs. We owe you an incredible debt of gratitude. Thank you."
It was the duke's first public appearance since the funeral of his grandfather, Prince Philip on 17 April. His wife the Duchess of Sussex, who is pregnant, stayed at home.
The couple are campaign chairs of Vax Live, organised by anti-poverty group Global Citizen.
US President Joe Biden and First Lady Jill Biden also appeared at the concert in a pre-recorded video.
President Biden said he was "working with leaders around the world to share more vaccines and boost production".
The singer Selena Gomez hosted the event, calling for "doses and dollars" to go to the world's poorest countries.
Rock band Foo Fighters were joined by surprise guest Brian Johnson of AC/DC for a rendition of the Australian band's hit Back in Black.
And actress and singer Jennifer Lopez was joined on stage by her mother to sing Neil Diamond's Sweet Caroline.
Other celebrity guests, including Ben Affleck, David Letterman, Jimmy Kimmel and Sean Penn, all called for equal access to vaccines around the world, or vaccine equity.
Other video messages came from Pope Francis, French President Emmanuel Macron and Canadian Prime Minister Justin Trudeau.
In his address Prince Harry called on people to come together and commit to their "shared humanity".
"The vaccine must be distributed to everyone everywhere," the Duke said.
"We cannot rest or truly recover until there is fair distribution to every corner of the world. The mission in front of us is one we cannot afford to fail at and that's what tonight is about."
Prince Harry also voiced support for India, which is in the midst of a Covid crisis which has overwhelmed hospitals.
"Tonight, we stand in solidarity with the millions of families across India, who are battling a devastating second wave," he said.
"The virus does not respect borders, and access to the vaccine cannot be determined by geography."
Vax Live is calling on governments to commit to vaccine equity by donating doses and resources.
The event raised $53.8 million (£38.8 million) for Covax, which is working to to ensure vaccines are shared fairly among all nations, rich and poor. Organisers said it was enough to help purchase almost 10.3 million vaccine doses.
More than one billion doses of coronavirus vaccines have now been administered worldwide. But there are vast differences in the pace of progress in different parts of the world, with some countries having delivered doses to a large proportion of their population and others still waiting for their first shipments to arrive.
The concert will stream on YouTube, along with American television networks, on 8 May at midnight GMT.