Obama, speaking at the First National Bank Stadium in Johannesburg, South Africa, under rainy skies compared Mandela, who died Thursday at age 95, to other rights heroes such as Mahatma Ghandi and Martin Luther King Jr., and said Mandela "speaks to what is best inside us."
"Mandela showed us the power of action, of taking risks on behalf of our ideals," Obama said.
Mandela, called affectionately "Madiba," would "emerge as the last great liberator of the 20th century" who earned his place in history through "struggle and shrewdness ... [and] persistence and faith," Obama said
Obama was among many world leaders who paid tribute to South Africa's first black president and anti-apartheid leader, who was a source of inspiration in Obama's adult life.
"For the people of South Africa, for those he inspired around the globe -- Madiba's passing is rightly a time of mourning and a time to celebrate his heroic life," Obama said. "But I believe it should also prompt in each of us a time for self-reflection. With honesty, regardless of our station or circumstance, we must ask: how well have I applied his lessons in my own life?"
"We will never see the likes of Nelson Mandela again," Obama said. "But let me say to the young people of Africa, and young people around the world -- you can make his life's work your own."
Outside of the stadium, electric billboards also carried tribute to signs.
One read "Rest in peace Mad'ba" while others carried Mandela's quotes, such as, "The sun shall never set on so glorious a human achievement."
South African President Jacob Zuma was greeted with a chorus of boos as he approached the podium, the British newspaper the Guardian reported.
After thanking the Mandela family and visiting dignitaries, Zuma said, "Everyone has had a Mandela moment when this world icon has touched their lives."
Andrew Mlangeni, who was in prison with Mandela on Robben Island, said Mandela touched many lives and was "no doubt" smiling as he watched South Africans unite to celebrate his life and legacy.
Cuban leader Raul Castro, who shook hands with Obama, called Mandela "the ultimate symbol of dignity ... a prophet of unity, peace and reconciliation."
The service was delayed by an hour as world leaders and mourners struggled to reach the soccer stadium because of traffic and transit delays, the Guardian said.
Ninety-one world leaders attended the service.
Former U.S. Presidents George W. Bush, Bill Clinton and Jimmy Carter and their wives, along with 26 members of the U.S. Congress, were to attend the service. Carter attended as a member of the Elders, a group of veteran global figures sponsored by Mandela, the group said.
Besides the 91 world leaders, 10 former heads of state, 86 heads of delegations "and 75 eminent persons" were expected to attend the 4-hour service, South Africa's Presidential Ministry said.
Security was tight and the stage where world leaders spoke was protected by bulletproof glass, officials said.
After the memorial, Mandela's body was to lie in state for three days in the Union Buildings in Pretoria -- once the seat of white power -- before his state funeral and burial Sunday in the small Eastern Cape provincial village of Qunu where Mandela was grew up and retired in May 2012.