The ministry said on Thursday that the UN had decided Julian Assange was treated unlawfully by UK authorities.
"We can only note that the working panel has come to another conclusion than Swedish judicial authorities," a foreign ministry spokeswoman told the AFP news wire, a day before the panel was to publish its report.
In an earlier statement, the Wikileaks founder said that he expected to avoid being held by police if the ruling went his way.
“Should I prevail and the state parties be found to have acted unlawfully, I expect the immediate return of my passport and the termination of further attempts to arrest me," he said.
However the UK government said British police would still arrest Assange if he left the embassy.
Meanwhile Ecuador said on Thursday that he was welcome to remain in its London embassy, despite the UN panel's expected ruling.
"It's a personal decision. We've given him protection and of course it is still in place. The basis on which we granted him asylum remains in place," its ambassador Ricardo Patino told journalists.
Assange's Swedish lawyer Per Samuelsson suggested to The Local that a ruling in his client's favour meant Swedish prosecutor Marianne Ny would have to ask a court to lift the warrant issued against him.
"It is now official in Sweden that we have won, so we are demanding the prosecution to withdraw the European arrest warrant and to close the case," he said.
The Swedish prosecution authority has yet to comment on the panel's report.
Samuelsson said that he had attempted to contact Ny, but was told she was on vacation.
The lawyer said he had not spoken to his client since the Swedish government confirmed the UN panel's decision, which was first broken by the BBC.
"He found out from the BBC (...) He was nervous. Now it has been confirmed by the Swedish foreign ministry, he must be very pleased."
Any decision by the UN panel is not legally binding, however Justice for Assange claims its rulings have previously influenced the release from detention of prominent figures including Myanmar's Aung San Suu Kyi and Washington Post journalist Jason Rezaian, who was held by Iran for 18 months.
Assange has been holed up in the Ecuadoran embassy in west London for more than three years in a bid to avoid extradition to Sweden over rape allegations, a charge he has denied.
Ecuador has granted him asylum, but it was understood he faced immediate arrest if he stepped onto British soil and for years police were posted around the clock outside its doors at a cost of millions of pounds.
In September 2014, he filed a complaint against Sweden and Britain to the UN Working Group on Arbitrary Detention claiming his confinement in the embassy amounts to illegal detention.
"The only protection he has ... is to stay in the confines of the embassy; the only way for Mr Assange to enjoy his right to asylum is to be in detention," the submission said.
"This is not a legally acceptable choice," it added, according to a file posted on the website justice4assange.com.
The Australian has long feared he could eventually face extradition to the United States to be put on trial over the leak of hundreds of thousands of classified military and diplomatic documents.
Story continues below…
Assange founded Wikileaks in 2006, and its activities including the release of 500,000 secret military files on the wars in Afghanistan and Iraq and 250,000 diplomatic cables have infuriated the United States.
The main source of the leaks, US Army soldier Chelsea Manning, was sentenced to 35 years in prison for breaches of the Espionage Act.
A divisive figure, Assange has likened his confinement in the embassy, where he lives in a small room divided into an office and a living area, to living in a space station.
Previously he lived in the more impressive surroundings of an English country mansion owned by one of his supporters, documentary maker Vaughan Smith.
Wikileaks has said that Sweden's handling of the case has left a "black stain" on the country's human rights record.