The secretary-general, Ban Ki-Moon, met Malcolm Turnbull on the sidelines of the Asean summit in Malaysia on Sunday.
Ban also raised concerns about conditions in Australia's detention centres in Nauru and on Papua New Guinea's Manus Island.
The meeting is not the first time the UN has raised concern about offshore detention, where there have been numerous reports of unsafe conditions, physical and sexual violence, and two deaths on Manus Island.
In March, the UN Special Rapporteur on Torture, Juan Mendez, released a report that found Australia's treatment of asylum seekers breached international conventions on torture.
The then-prime minister, Tony Abbott, reacted angrily, saying Australians were sick of being lecture to by the UN.
His successor, Turnbull, is unlikely to change the policy in the face of international criticism, and the main opposition party, Labor, also supports offshore detention.