Marianne Nye said she had decided to “discontinue” the investigation, although it is unlikely to lead to Mr Assange immediately leaving the Ecuadorian Embassy in London, where he has been living for almost five years.
Scotland Yard said it was obliged to execute a warrant issued by Westminster Magistrates’ Court for the arrest of Mr Assange following his failure to surrender to the court in June 2012 should he leave the embassy.
The Swedish announcement came ahead of a press conference by Ms Ny into the long running saga.
Mr Assange was questioned six months ago in the presence of Swedish officials over a sex allegation, which he has always denied.
Mr Assange faces extradition to the United States for questioning over the activities of WikiLeaks if he leaves the embassy.
A brief statement ahead of today’s press conference said: “Director of Public Prosecution, Ms Marianne Ny, has today decided to discontinue the investigation regarding suspected rape (lesser degree) by Julian Assange.”
Scotland Yard said: “Westminster Magistrates’ Court issued a warrant for the arrest of Julian Assange following him failing to surrender to the court on June 29 2012. The Metropolitan Police Service (MPS) is obliged to execute that warrant should he leave the Embassy.
“Whilst Mr Assange was wanted on a European Arrest Warrant (EAW) for an extremely serious offence, the MPS response reflected the serious nature of that crime. Now that the situation has changed and the Swedish authorities have discontinued their investigation into that matter, Mr Assange remains wanted for a much less serious offence. The MPS will provide a level of resourcing which is proportionate to that offence.
“The priority for the MPS must continue to be arresting those who are currently wanted in the capital in connection with serious violent or sexual offences for the protection of Londoners.”
The Metropolitan Police stopped its round the clock presence outside the Embassy in October 2015 amid controversy over the escalating cost of the exercise - believed to be over £12 million.
Friday’s development follows a letter sent to the Swedish government by the government of Ecuador saying there had been a “serious failure” by the prosecutor, including a “lack of initiative” to complete inquiries.
The letter raised developments in the United States since the election of Donald Trump as president, including a speech by CIA director Mike Pompeo describing WikiLeaks as a “hostile intelligence service”.
Recent public declarations such as this constitute an “obvious risk” for Mr Assange, said the letter.
Mr Assange originally faced three sex allegations, all of which he denied.
Mr Assange was on bail when he arrived at the Ecuador embassy in Central London almost five years ago.
WikiLeaks tweeted: “UK refuses to confirm or deny whether it has already received a US extradition warrant for Julian Assange. Focus now moves to UK.”