The Court of Arbitration for Sport said on Thursday it had rejected Russia's appeal against the exclusion of its track and field athletes from the Rio Games starting on August 5.
"CAS rejects the claims/appeal of the Russian Olympic Committee and 68 Russian athletes," CAS said in a statement.
The ruling by the CAS, sport's highest tribunal, will be taken into consideration by the International Olympic Committee (IOC) as it ponders whether to impose a blanket ban on Russia from all sports.
The affair has triggered a crisis in world sport, with Russian President Vladimir Putin speaking of the risk of a split in the Olympic movement.
Russian track and field athletes were banned from international competition in November after an independent commission set up by the World Anti-Doping Agency (WADA) found rampant state-sponsored doping in Russian athletics.
The ban was imposed by the IAAF, the global governing body for athletics, which reconfirmed it last month, saying there were still considerable problems with anti-doping in Russia.
The appeal was launched by the Russian Olympic Committee (ROC) and 68 Russian athletes who said they were being punished despite not having failed drugs tests, and that they should be eligible to compete in Rio.
On Monday, another WADA report revealed evidence of systematic and widespread state-sponsored doping by Russian competitors before and at the 2014 Sochi Winter Olympics. This has prompted the IOC to consider banning Russia from Rio altogether.
The IOC is expected to reach a final decision within the next week and has said it will take the CAS ruling into account.