Margaret Beckett, the UK foreign secretary, said the British and US governments had been discussing al-Rawi's case since Britain first asked for his release last year.
"We have now agreed with the US authorities that Mr al-Rawi will be returned to the UK shortly, as soon as the practical arrangements have been made," she said in a written statement to parliament on Thursday.
"This decision follows extensive discussions to address the security implications of Mr al-Rawi's return. The UK will continue to take the necessary measures to maintain national and international security."
Asked if al-Rawi would be coming back from Guantanamo a free man, a foreign office spokesman said: "It's an operational issue. We can't comment on individual cases."
Al-Rawi and his business partner, Jamil el-Banna, a Jordanian, were arrested by Gambian authorities when they flew to the African country in late 2002, Davey, an opposition Liberal Democrat, told Britain's parliament in January.
They were handed over to the US Central Intelligence Agency and taken to Afghanistan before being transferred to Guantanamo Bay, he said.
Davey accused Britain's MI5 intelligence service of being complicit in their arrest - a charge Britain denies.
Al-Rawi's lawyers believed his mental health was deteriorating fast after four years in the US detention camp, Davey said.
He said al-Rawi knew Abu Qatada, the London-based Islamic cleric whom Britain wants to deport to Jordan, where he has been convicted in absentia of involvement in terrorist plots.
Britain has secured the release of all nine of its citizens held at Guantanamo Bay but argues it is not obliged to seek the release of several other detainees who merely lived in Britain.