The immigration removal centre near Strathaven, South Lanarkshire, has been branded “racist and inhumane’’ by campaigners who have long called for it to be closed.
A replacement short-term holding centre is to be built close to Glasgow Airport.
The new building in Paisley, Renfrewshire, is part of the UK Government’s strategy for a “more efficient and cost-effective detention estate”, the Home Office said.
Dungavel House, which opened in 2001, holds up to 249 detainees and is the only such centre in Scotland, but is said to be “under-utilised due to its remote location”.
Immigration Minister Robert Goodwill said: “We keep our detention estate under constant review to ensure we have the right resources in the right places.
“The new short-term holding facility would provide easy access to London airports, from where most removals take place, meaning those with no right to be in the UK can be removed with less delay.
“Closing Dungavel immigration removal centre as a consequence fits with that approach and will result in a significant saving for the public purse.”
Plans for the new centre on Abbotsinch Road beside Glasgow Airport need approval from Renfrewshire Council but it would have just 51 beds.
The Home Office said the “vast majority” of stays would be for less than a week.
Dungavel is expected to close near the end of 2017, within a few months of the new facility opening.
The latest in a series of protests was staged outside the centre in May as part of a Europe-wide day of action against detention centres.
Hundreds of campaigners, including former detainees, asylum seekers and refugees, took part.
One-time Dungavel detainee Sally Martinez told the crowd: “We believe we can end detention in Scotland. To see so many people here is really inspiring.
“The costs of detention are too great - it has a human cost, a financial cost and a moral cost. Dungavel’s time is up.’’
The centre has long been a political issue, with MSPs demanding an end to the detention of children at the centre.
It led to a 2010 Westminster review which decided families detained north of the border would be moved to Yarl’s Wood in Bedfordshire, which has specialist family and child facilities and support services.
Detainees have also taken part in action inside Dungavel, with many refusing food in a protest over a suicide at the centre in 2007.
Human rights lawyer Aamer Anwar, who has represented families detained at Dungavel, called the closure “long overdue”.
“As far back as 2003 when I represented the Ay family who were Kurdish Asylum seekers, a mother and her four children who sought safety in this country were incarcerated behind barbed wire for over a year,” Mr Anwar said.
“Their treatment disregarded the United Nations Convention on the Rights of the Child and subjected the Ay children to psychological torture and symbolised the treatment of other families and children.”
Mr Anwar urged the Scottish Government to seek guarantees that there will be “rigorous and independent accountability” of the new short-term facility.
He added: “If there is to be a legacy of those who died as a result of suicide at Dungavel or deportation, then immigration and detention policies must be devolved to Scotland so that we can begin to treat those who seek sanctuary with compassion and humanity.”