United Kingdom lawyers acting for eight of the men said they had been held for up to 14 months without charge in what could amount to unlawful detention.
They compared it to when the public became aware of Guantanamo Bay and want the UK High Court to free the men.
But Mr. Hammond said their release would put British troops at risk.
BBC reports that British forces in Afghanistan are allowed to detain suspects for 96 hours.
However, in “exceptional circumstances” – to gather critical intelligence, for example – they can hold them for longer.
The lawyers said their clients were arrested by British soldiers in raids in villages in Helmand and Kandahar provinces and have been held for between eight and 14 months without charge.
But the defence secretary dismissed claims that the UK is operating a secret facility in Afghanistan as “patently absurd.”
Mr. Hammond told BBC Radio 4′s Today programme that Parliament had been informed by this government and the previous one about the detention of Afghan suspects.
He declined to say how long some had been held and said the precise number of detainees fluctuated.
A spokesman for the Afghan Ministry of Defence, General Zahir Azimi said the detentions were illegal and inhumane.