The Russian Olympic Committee (ROC) and 68 Russian athletes attempted to overturn the suspension, implemented by the body that governs world athletics.
But the Court of Arbitration for Sport (Cas) has ruled it can stand.
A handful of Russian athletes could still compete as neutrals at the Rio Games, which start on 5 August.
Russia has reacted with anger after its bid to have the ban lifted ended in failure.
“In my view, certainly, this decision absolutely violates the rights of clean athletes, honest athletes, and sets a collective responsibility precedent,” Vitaly Mutko, Russia’s sports minister, said at a news conference in Moscow.