More than 30,000 people, among them Oprah Winfrey and Richard Branson, filled Cape Town's Greenpoint Stadium for the show, part of Mandela's 46664 campaign to fight AIDS, named after his number when he was imprisoned for his fight against apartheid.
With a massive bronzed image of his face as a backdrop, Mandela came on stage dressed in a black shirt with the number emblazoned across his chest.
"For the 18 years that I was in prison on Robben Island I was supposed to be reduced to that number," Mandela said. "Millions infected with HIV/AIDS are in danger of being reduced to mere numbers if we don't act now. They are serving a prison sentence for life."
The concert — broadcast live by the South African Broadcasting Corporation's Africa channel and on the internet — is part of an appeal to governments to declare a global AIDS emergency.
Between 34 million and 46 million people around the world are infected with HIV, including 5.3 million South Africans — more than in any other country, according to U.N. figures. The pandemic killed more than 3 million people this year.
The musicians, including the Corrs, Anastacia and Annie Lennox, performed free.
Gabriel and the Soweto Gospel Choir stilled the crowd when they performed "Biko," a tribute to slain anti-apartheid icon Steve Biko.
Brian May from the group Queen performed the song "46664," featuring Mandela's voice saying: "The struggle is my life. I will continue to fight."
Messages from former President Clinton and civil rights activist the Rev. Jesse Jackson were broadcast on a screen at the back of the stage.
Earlier, Bono and Beyonce visited a maternity unit and a childrens' home caring for HIV victims in Cape Town's impoverished township, Khayelitsha.
Bono said he is incensed by the suffering of thousands of Africans who do not have access to life-prolonging anti-retroviral drugs.
"This is an obscenity," he said. "This is like watching the Jews being put on trains."
The 46664 campaign, conceived by Dave Stewart, was put into place in partnership with the Nelson Mandela Foundation, as well as May and Roger Taylor of Queen.
The concert will be screened globally by MTV on World Aids Day on Monday. Proceeds are going to the foundation, whose work includes funding research on HIV and AIDS in South Africa and supporting services for sufferers.
MTV, like CBSNews.com, is part of Viacom.