The change will force officials to put migrant children's welfare first
The government has decided to sign the UN Convention on the Rights of the Child in full, the BBC has learned.
The UK has for the past 17 years retained an opt-out allowing child migrants and asylum seekers to be locked up without judicial scrutiny.
The convention obliges nations to put the best interests of a child first.
Next week's announcement coincides with a hearing at the UN in Geneva where British officials will be questioned on the UK's respect for children's rights.
The opt-out has meant the "best interest" rule does not apply to immigrant children in the UK and makes it easier for officials to lock them up, sometimes for weeks or months, pending planned deportation.
Foreign Secretary David Miliband will tell UN Secretary General Ban Ki-moon that the UK will sign the Unicef convention, after ministers became convinced it would not become a loop-hole which frustrates effective immigration control.
The change will force the UK Border Agency to put migrant children's welfare first in deciding whether to detain or deport them.
BBC News home editor Mark Easton says since 1991 the British government has argued that immigration control should take priority over signing the convention.
The move will go down well with Labour's rank and file, he added.