Given how cool it sounds — well, not literally, since there's no sound in space — to shoot a gun in space, it's a wonder there aren't more movies featuring space cowboy cops with real guns instead of laser pistols. Such films could even have some basis in fact, because shooting a gun in space would certainly work, though not quite like it does on Earth.
In addition to there being no sound in space, there is also no oxygen, which is required to create and sustain any kind of fire. Modern guns, however, have their own internal oxidizers, chemicals that ignite the gunpowder and fire the bullet. This internal process allows a gun to fire no matter where you are when you pull the trigger [source: Wolchover].
But here's where it gets interesting — and film-worthy. Perhaps you've heard of Newton's third law, which says that for every action there is an equal and opposite reaction [source: NASA]. What this means is that if you were floating in space and fired a gun, the recoil of the gun — that force that pushes against your shoulder on Earth, but which your feet and gravity help to stop — would push you backward, though you wouldn't really feel it. You'd only notice that while the bullet was moving in one direction, you'd be moving away from it in the opposite direction [source: Harris].
And what about that bullet? Bullets shot in space wouldn't really travel any faster than they would on Earth, though they could travel farther. On Earth, gravity eventually pulls the bullet down, even if it doesn't hit anything — or anyone. In space, where there is no gravity, your bullet could keep moving forever as long as it doesn't hit something — like an asteroid or a planet.
Of course, if your aim is really good (or if you're really unlucky), you could end up shooting yourself. How? If you're in orbit around a planet — meaning you're being held by a weak gravitational field — and you shoot straight ahead, the bullet will stay in orbit, come around the planet and shoot you in the back [source: Wolchover].
Not an honorable way for a movie to play out — but it might be fun in a dark comedy.