The president thanked his supporters and staff, his family and Vice President Joe Biden. He also touted the accomplishments of his administration, from passing health care to killing Osama Bin Laden.
Among the lines which drew the most applause from the crowd of his supporters at Chicago's Lakeside Center were those which drew the starkest contrast to the expected policies of his successor.
He called for Americans to remain on guard against the "weakening of the values that make us who we are."
"That's why I reject discrimination against Muslim-Americans who are just as patriotic as we are," he said.
Some of his most emotional comments were directed toward First Lady Michelle Obama and his daughters Sasha and Malia.
"For the past 25 years you have not only been my wife and mother of my children, you have been my best friend," he told Michelle, pausing to wipe his eye.
"You took on a role you didn't ask for and you made it your own with grace and with grit and with style and with humor."
Obama also boasted of some of the accomplishments of his administration, including recovering from the recession, boosting the auto industry, improving relations with Cuba, shutting down Iran's nuclear weapons program and killing Osama Bin Laden. He also referred to the legalization of gay marriage and the passing of health care.
Despite the vast differences between Obama and Trump, he said he is committed to a smooth transition to the next administration.
"In 10 days, the world will witness a hallmark of our democracy: the peaceful transfer of power from one freely-elected president to the next," Obama said.
As the crowd began booing, he had to pause and admonish them with "no no no no."
"I committed to President-Elect Trump that my administration would ensure the smoothest possible transition, just as President Bush did for me."
He also called for Americans, particularly those who are disappointed in the direction of the country, to become more involved in public life.
"If you're tired of arguing with strangers on the internet, try to talk with one in real life," Obama said. "If something needs fixing, lace up your shoes and do some organizing. If you're disappointed by your elected officials, grab a clipboard, get some signatures, and run for office yourself."
NATIONAL GEOGRAPHIC: OBAMA AT SEA
President Obama prepares to leave office with nearly all his moves captured on camera. But remarkable new pictures show him as he has been rarely seen before.
National Geographic shot images for their February issue, which show the president swimming in the Pacific Ocean, in an area around the Hawaiian Islands he protected under executive order.
They were the first photos of a sitting president underwater in the open sea. He grew up in these surroundings.
"People always ask why I stay calm in the midst of a lot of crazy stuff going on. I always tell people it's just being born in Hawaii and knowing what it's like to jump into the ocean and understanding what it means to see a sea turtle in the face of a wave," Obama said.
The president also credits his mother with helping to shape his love of nature. He said she was the kind of person who would wake him up to see a full moon.