The remarks by Mr. Ban, who is approaching his last year as the secretary general, were unusually pointed.

He called to leaders to not stay in power beyond their constitutional terms in office, pressed permanent members of the Security Council to put aside their divisions, called explicitly for an “end to bombings” in Yemen, and named the five countries that, as he said, “hold the key” to peace in Syria: Russia, the United States, Saudi Arabia, Iran, and Turkey.

Mr. Ban said 100 million civilians are in need of aid, for which the United Nations has pleaded for $20 billion. He rebuked the rich for not giving more, giving examples: One third of what the organization needs for Syria and Iraq has been received and for Gambia, whose children are among the hungriest in the world, nothing has come in.

He stepped up his criticism of countries that shut their borders to refugees. “I urge Europe to do more,” reminding the Continent’s leaders that “after the Second World War it was Europeans seeking assistance.”

He marked two pieces of good news. He praised the nuclear pact that the world powers reached with Iran. And with some relief, he noted that the world had come together to stop the Ebola virus from spreading.

President Dilma Rousseff of Brazil, who was the first to speak, scolded those countries that have tried to prohibit refugees fleeing conflicts in the Middle East, pointing out that Brazil hosts Syrians and Haitians now as it opened the doors to Europeans and Asians a century ago. “In a world where goods, capital, data and ideas flow freely, it is absurd to impede the free flow of people,” she said.