At least six of them alleged UK forces were complicit in their torture before they arrived at Guantanamo.
A ministerial statement on the out-of-court settlement is due to be made in the House of Commons later on Tuesday.
It is believed the government wanted to avoid a lengthy and costly court case which would also have put the British secret intelligence services under the spotlight.
Avoiding costs Bisher al-Rawi, Jamil el Banna, Richard Belmar, Omar Deghayes, Binyam Mohamed and Martin Mubanga were among those who had begun High Court cases against the government.
They had claimed that UK intelligence agencies and three government departments were complicit in their torture and should have prevented it.
In May, the Court of Appeal ruled that the government was unable to rely on "secret evidence" to defend itself against the six cases.
Then, in July, the High Court ordered the release of some of the 500,000 documents relating to the case.
BBC political correspondent Ross Hawkins said that around 100 intelligence officers had been working around the clock preparing legal cases.
He said the government wanted to avoid the cost of the court case, and that the terms of the settlement would remain confidential - something wanted by both the men and ministers.
He added that the Intelligence and Security Committee and the National Audit Office would be briefed about the payments.
He said the government would now be able to move forward with plans for an inquiry, led by Sir Peter Gibson, into claims that UK security services were complicit in the torture of terror suspects.
The settlement was believed to have been agreed after lengthy negotiations.
The Cabinet Office said: "The prime minister set out clearly in his statement to the House (of Commons) on July 6 that we need to deal with the totally unsatisfactory situation where for 'the past few years, the reputation of our security services has been overshadowed by allegations about their involvement in the treatment of detainees held by other countries'."
Tuesday's statement is expected to be made by Justice Secretary Ken Clarke.
The UK security services have always denied any claims that they have used or condoned the use of torture.
Last month, the head of MI6, Sir John Sawers described torture as "illegal and abhorrent" and defended the service's need for secrecy.
Mr Mohamed, from west London, was held in Pakistan in 2002 before US agencies moved him to Morocco, where he was severely tortured, before he was sent on to Guantanamo Bay in Cuba.
It later emerged that a British intelligence officer visited him in detention in Pakistan and that the CIA had told London what mistreatment he had suffered.
Mr Mohamed, 32, had alleged that his torturers in Morocco had asked questions supplied by MI5.
He was released in 2009, when allegations of British involvement in torture returned to prominence.