The Rolling Stones even managed to play together from four separate locations.
The eight-hour show also featured real-life stories from those on the front line of the fight against COVID-19.
Lady Gaga, who curated the line-up, called the event “a love letter to the world”.
Dedicating the show to first responders and medical staff, she said the participating musicians all wanted “to give back a little bit of the kindness that you’ve given us”.
She went on to play an upbeat version of Charlie Chaplin’s Smile, adding: “We want to get to the other side of this pandemic and we know you do too.”
Paul McCartney joined the programme shortly after, calling health-care workers “the real heroes” of the crisis and remembering his mother Mary, who was a nurse during the Second World War.
Titled One World: Together At Home, the concert was organised by the Global Citizen movement and the World Health Organization (WHO).
It began with a montage of people under lockdown applauding the efforts of healthcare workers around the world – from France, Spain, the UK, the US and elsewhere.
“To all of our frontline healthcare workers, we are with you. Thank you for being there for us,” read an on-screen caption.
Proceeds generated from the concert will go to the Covid-19 Solidarity Response Fund for the WHO, but Lady Gaga made clear the show was not a fundraising telethon and would focus on entertainment and messages of solidarity.
First to perform was US singer songwriter Andra Day, who sang the ballad Rise Up from her apartment, setting the tone for the rest of the evening.
One Direction star Niall Horan followed shortly afterwards singing Black and White with an acoustic guitar from his living room and former bandmate Liam Payne appeared with the song Midnight.
“It’s a pretty dark time for us all right now… and I feel we’re all being brought a lot closer together by this solidarity,” he said.
Brandon Flowers and Ronnie Vannucci of The Killers performed their hit Mr Brightside, while US singer Adam Lambert gave a rendition of the Tears for Fears song Mad World – which he first performed as an X Factor contestant in 2009.
John Legend teamed up with Sam Smith to cover Ben E King’s Stand By Me, while Billie Eilish played a soulful version of Bobby Hebb’s Sunny.
“I love this song,” said the star. “It’s always warmed my heart and made me feel good, and I wanted to make you guys feel good, too.”
The Rolling Stones also delivered a spirited version You Can’t Always Get What You Want – despite drummer Charlie Watts being reduced to banging on flight cases and the arm of a sofa, in the absence of his drum kit.
British singer Rita Ora urged viewers to stay safe and follow WHO recommendations, before singing I Will Never Let You Down.
Annie Lennox, meanwhile, appeared to address President Donald Trump’s threat to pull funding from the WHO earlier this week.
“In this unprecedented moment in history we have a collective responsibility to make sure that global health systems are strong enough to identify and prevent future pandemics before they happen again,” said the singer, although she didn’t mention President Trump by name.
Ellie Goulding and Christine + The Queens also addressed the mental health issues arising from the coronavirus lockdown, urging viewers to reach out to friends if they were feeling low.
“I know it’s hard,” said Christine, whose real name is Heloise Letissier, “and don’t hesitate to reach out to people virtually if you feel down.”
Source: bbc.com