Shaker Aamer, 46, has been detained without trial in the US maximum security prison in Cuba for 13 years despite being cleared for release in 2007.
He has never been charged or been on trial.
A UK government spokesman said Aamer would be released after a notice period that usually lasts 30 days
Since 2007 the Saudi national has been cleared for release twice by presidents George W Bush and Barack Obama.
He has permission to live in the UK indefinitely because his wife is a British national. His family and a host of campaigners have made repeated calls for him to be released and reunited with his wife and four children at their south London home.
The government spokesman said: “The government has regularly raised Mr Aamer’s case with the US authorities and we support President Obama’s commitment to closing the detention facility at Guantanamo Bay.
“In terms of next steps, we understand that the US government has notified Congress of this decision and once that notice period has been concluded, Mr Aamer will be returned to the UK.”
He was detained in Kabul, Afghanistan, in 2001. US authorities allege he led a unit of Taleban fighters and had met former al-Qaeda leader Osama Bin Laden.
However, Mr Aamer has maintained he was in Afghanistan with his family doing charity work. The reasons for his continued detention post-2007 remain unclear.
Mr Aamer’s lawyer, Clive Stafford Smith of the campaign group Reprieve, said his return to the UK was great news “albeit about 13 years too late”. He said that his client should not now have to wait for the 30-day notice period to be released and called on the Government to demand that he was “on a plane tomorrow”.
“British politicians may ‘bombasticate’ about our ‘robust and effective systems to deal with suspected terrorists’ but Shaker is not and never has been a terrorist, and has been cleared by the Americans themselves for eight years,” Mr Stafford Smith said.
“I hope the authorities will understand that he has been tortured and abused for more than a decade, and what he wants most is to be left alone with his family to start rebuilding his life.”
Amnesty International UK director Kate Allen said: “The news is a huge relief. In the past Mr Aamer has reportedly been at death’s door during a hunger strike and his return to his family in Britain won’t come a moment too soon.”
More than 100 people remain detained in Guantanamo, which Mr Obama wishes to close in the face of stiff opposition.