An international system built on those ideals has increased wealth and prosperity, while making countries more interdependent and exposing "deep fault lines in existing international order", he said.
"I believe that at this moment, we all face a choice," Obama said. "We can choose to press forward with a better model of cooperation and integration, or we can retreat into a world sharply divided and ultimately in conflict along age-old lines of nation and tribe and race and religion.
Obama, who leaves office in January, said open markets and accountable governance, democracy and human rights, and international law "remain the firmest foundation for human progress in this century".
But a "basic sense of injustice" undermines people’s faith in the system, and those trumpeting globalization are not helping by ignoring inequality, he said in his final address to the UN.
He urged nations to increase cooperation in the face of common challenges, refusing the unilateral impact of the U.S. as a solution.
"I've noticed as president, that at times both America's adversaries and some of our allies believe that all problems were either caused by Washington or could be solved by Washington. And perhaps, too many in Washington believe that, as well," he said.
He went on to say, however, that he thought the U.S. is a "rare superpower" in its altruistic nature as it "has been willing to think beyond narrow self interest".
Obama referenced his administration's overture to former adversaries, Cuba and Myanmar, as examples of progress, as well as global concerted efforts to counter global warming, the latest example of which was the Paris agreement awaiting ratification from UN member states.
The agreement is expected to come into effect Wednesday after passing the required threshold of adoption by at least 55 countries representing at least 55 percent of global greenhouse gas emissions.
Obama, after running for president on a platform of "Yes, we can!" and serving for eight years as the first black president of the world's most powerful nation, is leaving behind a legacy of: Yes, we still can.
His presidency has overseen the world's inability to resolve a five-year conflict in Syria that has killed hundreds of thousands of victims and displaced millions, triggering mass migration that has left the international community struggling to cope with a refugee crisis unprecedented in decades.
On Syria, Obama said there was "no ultimate military victory to be won", calling instead for the hard work of diplomacy.
He also urged Palestinians to reject incitement and recognize Israel, while calling on the Jewish state to realize it "cannot permanently occupy and settle Palestinian land".
He criticized authoritarianism and failure of leaders to provide their citizens with fundamental human rights and freedoms, citing them as pillars for a country’s success.
Obama lamented the absence of "basic security" in the Middle East, a threat he said would continue spreading to western countries unless checked.
Without mentioning him by name, Obama took a jab at Republican presidential hopeful Donald Trump for his oft-repeated pledge of building a wall on the southern U.S. border with Mexico to stop illegal immigration.
"[E]xtremism will continue to be exported overseas and the world is too small for us to simply be able to build a wall and prevent it from affecting our own societies," he said.
“And what is true in the Middle East is true for all of us," he added.
Taking his high-profile listeners on a world tour, Obama touched on some of the major global issue or foreign policy priority on his radar including climate change, nuclear proliferation, economic development equality, the fight against terrorism and democracy and human rights.
Referencing the leading figure of the civil rights movement, Martin Luther King, Obama called on leaders to be "coworkers with God" in charting a better way forward. "And our leadership and our governments and this United Nations should reflect this irreducible truth," he said.