The Wikileaks founder is wanted over rape and sexual assault claims made by two women in Sweden in 2010.
The Australian has been holed up in Ecuador's embassy for two years to avoid extradition to Stockholm.
Stockholm District Court previously ruled that an arrest warrant against him should stay in place, but Assange appealed the decision in July.
That appeal was rejected on Thursday afternoon by the Svea Court of Appeal.
"The Court of Appeal refuses Julian Assange's claim that the detention order of the city court be set aside," the court said in its ruling.
It said it agreed with the district court that Julian Assange remained under suspicion for sex-crime offences and continued to pose a flight risk.
But in a written document, the court said it disagreed with Assange's claim that his stay at the Ecuadorian embassy could be likened to incarceration.
"Julian Assange can leave the embassy if he wants," it read, while acknowledging that this would then lead to his extradition to Sweden.
Assange's lawyer Per Samuelson told The Local:
Last month Assange said he was "confident" of winning the appeal.
"We will win because the law is very clear. My only hope is that the court is following the law and is not pressured politically to do anything outside of the law," Assange said via a video link screened at a human rights film festival in Barcelona.
TIMELINE: Julian Assange sex claims
Assange previously argued that extradition to Sweden could lead to him being transferred to the United States to face trial over Wikileaks' publication of classified US military and diplomatic documents.
He called on Swedish prosecutors to travel to London to question him or, alternatively, to do so by video link, but they rejected the demand on the grounds that it was not normal legal practice.
In 2010, Wikileaks began publishing 250,000 American diplomatic cables and 500,000 classified military reports, covering both American diplomacy and the US wars in Iraq and Afghanistan.
Member comments