January 18, 2017 0806 GMT
Capping eight years in the White House, Obama returned to his adopted hometown of Chicago to recast his "yes we can" campaign credo as "yes we did".
Surveying the staging posts of his presidency – from the Iran nuclear deal to reforming health care – the speech sought to lift supporters shaken by Donald Trump's shock election, AFP reported.
Obama urged them to pick up the torch, fight for democracy and forge a new, fairer, "social compact".
"For all our outward differences, we are all in this together," he said, warning that naked partisanship, racism, and inequality all threaten democracy. "We rise or fall as one."
The incoming Republican president has smashed convention, vowed to efface Obama's legacy and hurled personal insults left and right.
Democrats, cast into the political wilderness with the loss of the White House, the Senate and the House of Representatives plus a majority of statehouses, are struggling to regroup.
Obama's last trip on Air Force One was a visit to Chicago, where he addressed a sellout crowd of some 18,000 not far from where he delivered his victory speech eight years ago.
Diehard fans were joined by First Lady Michelle Obama, Vice President Joe Biden and his wife Jill – who the president described as "family" in an emotional finale to his speech.
Wiping a tear from his eye, Obama paid a poignant tribute to his own family, his daughter Malia who was present and Sasha who stayed in Washington because of an exam, and the first lady who he addressed as his best friend.
Obama also acknowledged that his historic presidency was not a panacea for the country's racist past.
"After my election, there was talk of a post-racial America," he said. "Such a vision, however well-intended, was never realistic. Race remains a potent and often divisive force in our society."
Obama warned of growing economic inequality and of the coming economic losses of middle-class jobs to automation. He implored Americans not to embrace divisions based on race.
“After all, if every economic issue is framed as a struggle between a hardworking white middle class and undeserving minority, then workers of all shades are going to be left fighting for scraps while the wealthy withdraw further into their private enclaves,” he said.
With an approval rating hovering around 55 percent, according to a Quinnipiac University poll, Obama still carries considerable political weight.
Some 51 percent of Americans polled believe that Trump is doing a bad job as president-elect.
Trump's unorthodox politics have thrown the 55-year-old Obama's transition and post-presidency plans into flux.
Supporters who had earlier shouted "Four more years! Four more years!" – lingered in the hall until long after Obama had left.