The body of the mugger, named as Leonardo Lopes Batista, which lay for several hours on the road as police underwent investigations, was seen by various Olympic delegations, which passed by on the special Olympic lanes close to the crime scene.
One witness told how the mugger shouted, "you've lost, hand over your watch" as he announced the robbery, before breaking the car window with his revolver.
His accomplice reportedly fled after seeing his partner suddenly hauled inside the diplomat's car.
In a statement, Rio's 31st Military Police Battalion, which investigated the incident, said Braga "acted quickly pulling the criminal inside the car, took his revolver and fired it towards him".
Rio's Homicide Police Station said investigators were still at the crime scene, more than five hours following the shooting.
A spokesman said: "The man involved is a lawyer and also the vice-consul of Russia. He is Brazilian and a native of Rio de Janeiro.
"He is not part of or has any relation with the Olympic committee of Russia which is in Rio de Janeiro for the Olympics."
The shooting is a reminder of Rio's reputation for violent crime.
The combination of fears of a terrorist attack and the need to keep down the city's crime problem has led to the deployment of 80,000 members of the security forces in Rio.