"I believe that Chancellor Merkel's approach to the refugee crisis -- and that of many Germans -- has been courageous. She's demonstrated real political and moral leadership," Obama said in an interview published Saturday with German daily Bild.
"Angela has spoken of our moral obligation to people, including families and children, fleeing horrific conditions, including the barbarity of the Assad regime in Syria and ISIL (Islamic State)," Obama said.
"We simply cannot shut our doors to our fellow human beings when they are in such desperate need."
Merkel, who was going to Turkey on Saturday to discuss a deal on migration, has come under fire after Germany took in more than a million asylum seekers in 2015.
Opponents, including from within her conservative camp, have argued vocally that Europe's top economy is ill-equipped to integrate the waves of newcomers.
Obama spoke out in strong support of Merkel ahead of her high-stakes Turkish visit.
He told Bild the migration burden needed to be properly shared out -- the US is committed to taking in at least 10,000 Syrians this year -- and that "the recent agreement between the EU and Turkey is a step toward a more equitable way of sharing this responsibility."
Germany and its EU allies are seeking to boost a €6 billion ($6.7 billion) deal with Ankara to return migrants arriving on Greek shores to Turkey. But the deal remains beset by myriad moral and legal concerns.
Merkel will arrive in Turkey amid a row over Germany's prosecution of a German comedian for a crude poem about President Recep Tayyip Erdogan.
Her decision to authorise criminal proceedings has sparked a freedom of speech storm at home.
Jan Boehmermann could be convicted under a rarely-enforced piece of criminal code on insulting representatives of foreign states after his televised recital of a work accusing Erdogan of bestiality and paedophilia.
Obama was due in Germany on Sunday to attend the Hanover industrial technology fair ahead of informal talks Monday with Merkel, French President Francois Hollande and British and Italian prime ministers David Cameron and Matteo Renzi.
Dubbing Merkel "one of my closest partners and also a friend," Obama additionally praised her for leadership "essential to maintaining European unity against Russia's aggression against Ukraine."