Mrs Clinton personally told the Foreign Secretary that the US government would consider the dramatic step if a short summary of the treatment of Binyam Mohamed is placed in the public domain, the High Court was told.
A hearing was told that the move could cause "serious harm" to Britain's national security and potentially put the lives of British citizens at risk.
Karen Steyn, representing Mr Miliband, told two senior judges that members of the Obama administration, including Mrs Clinton, had made clear that intelligence sharing between the two countries "would" be reconsidered if the court went ahead with plans to publish the information.
The high level intervention follows a protracted legal wrangle over whether a seven-paragraph summary of Mr Mohamed's treatment at the controversial camp on Cuba, drafted for inclusion in a High Court judgment last year, could undermine national security if it were to be published.
Lord Justice Thomas and Mr Justice Lloyd Jones reluctantly agreed to leave the passage out of the judgment on August 2008 because of evidence from Mr Miliband of a potential "threat" to cut off security co-operation if the classified evidence was made public.
It later emerged that this was based on communications between the Government and the outgoing Bush administration. The claims were the first time the threat has been attributed to senior members of Mr Obama's administration. Mr Obama has promised to close Guantanamo Bay and has already published detailed evidence of the treatment of some detainees there.
As a result the judges reopened the case earlier this year and have been considering an application from parts of the media to finally place the information, which is based on US intelligence evidence, into the public domain.
Mr Mohamed, 30, an Ethiopian who was granted refugee status in Britain in 1994, was detained in Pakistan in 2002 on suspicion of involvement in terrorism and then "rendered" to Morocco and Afghanistan.
He alleges that he was tortured by his captors before being sent to Guantanamo Bay in 2004 from which he returned last year.
At a hearing in London on Wednesday, Guy Vassall-Adams, representing the media, argued that keeping the information secret would provide a "veto" to the alleged perpetrators or human rights abuses.
But Karen Steyn, representing Mr Miliband told the court that the Foreign Secretary was convinced that publishing the redacted paragraphs would seriously threaten the "unique" intelligence sharing relationship between Britain and the US, despite the change in administration.
"The conversations that he has had with the US Secretary of State are part of the information that he has taken into account in forming that assessment," she said.
In lengthy and heated exchanges, Lord Justice Thomas repeatedly pressed Miss Steyn on whether Mr Miliband had been told personally that a warning had come directly from the Obama administration.
Insisting that there could be no "wriggle room" on the issue, the judge said: "He (Mr Miliband) understands the position of the US government is that it would risk the intelligence relationship with the United Kingdom with the result that there would be a serious risk to the national security of the UK and that would endanger the men, women and children of the United Kingdom - that is really what Mrs Clinton is saying according to the Foreign Secretary?"
Miss Steyn said that Mr Miliband had made it "absolutely plain".
The judge ordered a transcript of the hearing to be sent to the Foreign Secretary directly to give him an opportunity to make clarify what he meant.
At a press conference in Washington later alongside Mrs Clinton, Mr Miliband said: "Our two countries have a uniquely close intelligence sharing relationship.
"It is a relationship which is based on deep trust and a fundamental principle is that we do not disclose each other's intelligence publicly."
Mrs Clinton refused to comment directly on proceedings in the High Court, saying that: "The issue of intelligence sharing is critically important to our two countries and we both have a stake in ensuring it continues to the fullest extent possible."