Obama -- who met the former South African president briefly only once in 2005, but was inspired to enter politics by the anti-apartheid hero's example -- paid a somber heartfelt tribute within 45 minutes of Mandela's death being announced.
"We will not likely see the likes of Nelson Mandela again," Obama said in a televised statement, hailing his political hero for his "fierce dignity and unbending will to sacrifice his own freedom for the freedom of others."
Obama said Mandela, in his journey from a "prisoner to a president," transformed South Africa and "moved all of us."
"He achieved more than could be expected of any man."
"Today he's gone home and we've lost one of the most influential, courageous and profoundly good human beings that any of us will share time with on this Earth.
"He no longer belongs to us; he belongs to the ages."
Obama recalled how his passion for change was stirred by taking part in an anti-apartheid rally -- his first ever political act.
"The day that he was released from prison gave me a sense of what human beings can do when they're guided by their hopes and not by their fears," Obama said.
The president ordered that flags on US government buildings, ships at sea and installations be lowered to half staff through sunset on Monday, in a rare honor for a foreign leader.
He also called South African President Jacob Zuma to offer his condolences and said that South Africa would continue to draw strength from Mandela's legacy as the hero who defeated the racist apartheid system.
First Lady Michelle Obama, who met the former president in South Africa in 2011, took to Twitter to praise Mandela's "extraordinary example of moral courage, kindness, and humility."
Mandela's fragile health overshadowed President Obama's trip to South Africa in June, and there had been fears that the former South African leader would pass away while Obama was in the country.
The president decided against visiting Mandela in the hospital, reasoning he would be a distraction, and met with members of his family instead.
But his entire trip became a prolonged tribute to Obama, and the president took his wife Michelle and daughters Malia and Sasha to Robben Island, where Mandela was held in spartan conditions by the racist apartheid regime.
In one wrenching shot taken by his official photographer, Obama was pictured in the tiny cell where Mandela once lived, with his emotional daughter in his arms.
He also walked with his family around the bleak limestone quarry on the island -- off the coast of Cape Town -- where Mandela endured years of backbreaking and futile work under the eyes of white South African guards.
Obama is expected to travel to memorial ceremonies for Mandela in South Africa once they are scheduled.
He will likely be joined on Air Force One by other key political leaders from the United States -- possibly including some of the living former presidents -- who were quick to react to Mandela's death with their own statements.
"I will never forget my friend Madiba," Bill Clinton said in a tweet, using Mandela's clan name, attaching a photo of the two ex-presidents sharing a joke.
"History will remember Nelson Mandela as a champion for human dignity and freedom, for peace and reconciliation," Clinton, who was president when Mandela took power, said in a longer statement.
Jimmy Carter said that Mandela's passion for "freedom and justice created new hope for generations of oppressed people worldwide."
"Because of him, South Africa is today one of the world's leading democracies," Carter said in a statement.
George H.W. Bush said he had watched in wonder as Mandela forgave his captors following 26 years in jail -- "setting a powerful example of redemption and grace for us all."
"He was a man of tremendous moral courage, who changed the course of history in his country," Bush senior said.
George W. Bush said that Mandela was "one of the great forces for freedom and equality of our time. He bore his burdens with dignity and grace, and our world is better off because of his example."