If you've ever wanted to be a space shuttle door gunner, pay attention: the weapon you might be operating could look something like this monster – the only projectile weapon designed for and fired in orbit around the Earth. Of course, it was the Soviet Union during the Cold War, who else would do that?
These are the people who taught terrorists to hijack planes just to be dicks to the West.
Despite some initial successes, the Soviet Union ended up losing the Space Race in a big way. Their loss is exemplified by the fact that the same day the Americans put men on the moon, the Soviets failed to land a probe there. So after a while, the disparity in technology irked the Soviet Union.
Most important to the USSR was the idea of American spacecraft being able to literally get their hands on Soviet satellites. Anti-satellite operations were something both powers prepared for, but the idea that the satellite itself would need protection up there all alone prompted the Soviets to arm one of theirs, just to see how that would go.
The Soviets built a station code-named "Almaz," a space station that held spy equipment, radar, and the R-23M, a 37-pound 14.5mm automatic cannon that could fire up to 5,000 rounds per minute that was accurate up to a mile away. There was just one problem: aiming the cannon. The cosmonauts in the station would have to rotate the entire space station to point the weapon.
It was supposed to be the first manned space station in orbit, but the Russians were more concerned with developing the weapon than they were other aspects of the capsule, like sensors and life support. So instead of building their grand space station, they slapped together what they had with the R-23M and a Soyuz capsule, called it the Salyut before launching it into space in 1971.
The CIA knew about every iteration of the Soviet Salyut spy stations, but what they – and much of the world – didn't know is that they actually fired the R-23M while in orbit. On Jan. 24, 1975, Salyut 3 test fired its weapon before the station was supposed to de-orbit. The crew had not been aboard for around six months at this point. While the Soviets never released what happened during the test, the shots and the station were all destroyed when they re-entered the atmosphere.
Firing a gun in space would be very different from firing on Earth. First, there is no sound in the vacuum of space, so it would not go bang. Secondly, the Soviets would have had to fire some kind of thruster to balance out the force exerted on the capsule by the weapon's recoil; otherwise the Salyut would have been pushed in the opposite direction. The weight of the projectile fired would determine how fast you would fly in the opposite direction.
Not to mention that shooting the weapon into Earth's orbit could cause the bullets to hit the station itself from the opposite direction.