Announcing the decision, president of the International Olympic Committee cited two Russian athletes testing positive for doping in Pyeongchang which he said was "hugely disappointing".
Russian athletes will not be able to march behind their flag at the Pyeongchang Winter Games closing ceremony after the IOC voted unanimously to keep the country's ban for mass doping.
But the International Olympic Committee (IOC) said the suspension could be lifted later if no further positive drug tests come out of the Games, after two Russians tested positive for doping in Pyeongchang.
Russia was banned in December from taking part in the 2018 Olympics following revelations of widespread drug-cheating, but 168 athletes deemed "clean" were allowed to compete as neutrals.
They were representing "Olympic Athletes from Russia" under strict guidelines including a ban on Russia's national flag, national colours and the Russian national anthem.
The vote to keep the ban followed a recommendation from the IOC's executive board, which met Saturday and early Sunday to thrash out Russia's fate.
The IOC "could have considered lifting the suspension given that the Olympic Athletes from Russia (OAR) had respected the IOC's decision of December 5," IOC president Thomas Bach said.
"However, two Russian athletes tested positive for doping here in Pyeongchang."
"This was hugely disappointing and does not permit the IOC to envisage lifting the suspension of Russia for the closing ceremony."
The IOC vote means that Russia will never be recorded as having taken part in the Pyeongchang Games despite the fact that the 168 Russians represented the fourth biggest delegation at the Games.
Nicole Hoevertsz, the IOC member who led a group charged with monitoring the behaviour of the Russians at the Games, praised their conduct.
"They have followed the spirit of the executive board decision (of December) throughout the entire period of the Games," she said.
However, taking into account the two doping violations at the Games, she recommended that the ban be kept because they represented a "violation" of the executive board guidelines for the OAR's participation.
'No malicious intent'
Russians Alexander Krushelnitsky, a bronze medallist in mixed doubles curling, and bobsledder Nadezhda Sergeyeva were kicked out of the Pyeongchang Olympics after testing positive for banned substances.
Stanislav Pozdnyakov, head of the Russian delegation, had earlier blamed "negligence rather than malicious intent" for the positive tests in a bid to have the suspension lifted for Sunday's closing ceremony.
The Russian situation, stemming from systemic doping culminating at the 2014 Winter Olympics in Sochi, overshadowed the build-up to Pyeongchang with dozens of Russian athletes filing legal challenges in a bid to take part in the games.
Just hours before the opening ceremony on February 9, 47 Russians implicated in doping lost a last-minute court bid to compete in South Korea.
Russia's suspension in December follows the uncovering of a doping conspiracy that involved secret agents at Sochi, where host nation Russia topped the medals table.
Investigations revealed an elaborate ploy where tainted Russian urine samples were switched with clean ones overnight using a "mousehole" in the wall of the Sochi anti-doping laboratory.
Russia has denied any government links to the conspiracy. But the IOC has suspended its former sports minister, Deputy Prime Minister Vitaly Mutko, for life.