Demirtas, 45, one of two former co-leaders of the leftist Peoples' Democratic Party (HDP), was arrested in November 2016 over alleged links to Kurdish militants.
The Strasbourg-based European Court of Human Rights (ECHR) on Tuesday urged Ankara to release Demirtas -- who hailed the move as "legal acknowledgement of my status as a political hostage".
The court accepted Demirtas had been arrested on "reasonable suspicion" of having committed a crime, but said the reasons given for keeping him behind bars were not "sufficient".
At a press conference with Cavusoglu in Ankara, Mogherini said on Thursday: "We hope he will be released shortly."
Demirtas denies all the charges and claims the case against him is politically motivated.
Turkish President Recep Tayyip Erdogan rejected the European court's finding.
"The decisions delivered by the ECHR do not bind us," he said.
Demirtas on Friday accused the government of putting "political pressure" on the Turkish appeals court to uphold his "completely unlawful" sentence, in a statement released by his party.
"We are witnessing a clear political intervention," he said.
"The aim here is to sentence me with another contrived political decision to keep me imprisoned, before the ECHR implements its decision."
But he remained defiant, saying: "We will never bow down, and we will stand tall with determination, our spirits high."
He added: "We will, soon or later, emerge victorious in our struggle for law, justice, freedom and democracy."