Mr Miliband argued that releasing the material would threaten Britain's national security because future intelligence sharing with the US could be compromised.
But at the High Court on Friday, Lord Justice Thomas and Mr Justice Lloyd Jones ruled that the risk to national security was "not a serious one" and there was "overwhelming" public interest in disclosing the material.
Their judgement was also delayed on Friday because MI5 insisted part of it - explaining why there was such a significant public interest in the case - should be redacted.
Ex-shadow home secretary David Davis - who first raised the case in the House of Commons - said it was "time for the government to accept the ruling of the court and stop trying to delay proceedings with further futile appeals".
Mr Davis added: "The British public have a right to know the judges' assessment of the extent of complicity of the UK and US Intelligence services in torture, and to determine for themselves why the government has tried for so long to cover up this assessment."
David Miliband: "If we give away other people's secrets, they will give us less information"
But Mr Miliband told the BBC's Newsnight that the court had breached a "fundamental principle" of intelligence sharing.
He said: "I have absolutely no objection to this material being put into the public domain by the US."
But, he added, "the principle is that one country's intelligence secrets belong to that country.
"If I give you my secrets, you don't put them into the public domain."
He said that if the court's ruling were upheld, "every other country that works with us on security issues will have to think again because they will have to be confident that the intelligence material that they share with us is safe with us".
Kurt Volker, former US ambassador to Nato, told the BBC this argument went "right to the heart of the issue".
He said: "If it is US intelligence information shared with the UK, and then that is released on the order of a UK court, then I think it calls into question what future intelligence can be shared.
'Not a threat'
"Please don't understand that as a threat that the US would seek to retaliate, but rather more an observation of how intelligence organisations are going to have to try to protect their own information if there is a risk it is going to be released."
The US also denies any allegations of torture concerning Mr Mohamed and a former senior official in the Bush administration told the BBC releasing the material would have an "enormous chilling effect" on US-UK relations.
Ian Kelly, a spokesman for the US State Department, praised Mr Miliband for his decision to appeal.
Asked at a press conference for his reaction to the court's verdict, Mr Kelly told reporters: "We are not pleased - and this has nothing to do with due process here.
"This has everything to do with the importance of protecting sensitive national security information and protecting this confidential channel that we have with our allies."
Mr Mohamed, who once lived in north Kensington, London, was first detained in Pakistan in 2002. He was questioned there by an MI5 officer before being transferred to Morocco.
He says while in US custody in Morocco he was tortured at the behest of the CIA and asked questions supplied by British intelligence agency MI5.
Mr Mohamed was later transferred to Guantanamo Bay and eventually released in February this year.
Before Friday's judgment, Mr Mohamed told BBC the material should be released.
Our courts should be gagged no longer and the crucial incriminating paragraphs published without delay
Shami Chakrabarti Liberty
He said: "The public needs to know what their government has been up to for the last seven years.
"There's information in there, which I'm 99% sure, states that the US sub-contracted the UK government to do its dirty work."
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.