EU member Slovenia recently decided to allow entry only to migrants from Syria, Iraq and Afghanistan, prompting Serbia and Macedonia to do the same.
Croatia, another EU country on the so-called Balkan route, is also allowing in refugees from Palestine.
The UN General Secretary Ban Ki-moon "expresses his serious concerns on the recent border restrictions imposed by a number of states in the Balkans," the UN said in a statement on Tuesday.
"Profiling asylum seekers on the basis of their alleged nationality infringes the human right of all people to seek asylum, irrespective of their nationality and to have their individual cases heard," it added.
Respond with 'compassion'
The measures introduced last week come after months of Europe-wide bickering on the response to the refugee crisis, with thousands of refugees entering the EU every day.
Refugees from Iran, Bangladesh, Pakistanis and various African countries have been among those influenced by the recent decision.
The UN head also urged European governments to boost their capacities to receive and relocate refugees.
Ban called on authorities "to respond with compassion, solidarity and shared responsibility," and to ensure that their policies on screening refugees adhere to international regulations, his spokesman Stephane Dujarric said.
The head of the global organization also stressed that collective expulsion and return of asylum seekers were strictly prohibited under international law.
dj/bw (AP, Reuters)