There is a common depiction in movies and novels of bullets exploding and "shooting off" when exposed to fire. The idea is pretty straight forward. Throw a cartridge into a fire and the heat will set off the gunpowder. It can make for some harrowing scenes. The gunshots can cause a distraction, pin down the cops, or even kill someone. Unfortunately, the entire idea is fiction.
Heat damage to live ammunition occurs more frequently than you may think. Over 70 million homes have ammunition in the United States and when one of those homes goes up in flames, so does the ammo. We call it "cook off". The process will generate the sound of gunfire but little else. Huge cook offs at military (small arms) ammunition depots have been recorded with little or no destructive effects (other than the fire that is).
Firearms work because they contain a small explosion. All of the gasses and energy released from the casing has only one direction to go; out the muzzle. Barrel diameters match the caliber of the bullets being fired through them. The fit is extremely tight so the gasses stay behind the bullet and propel it down the barrel. But when the cartridge is not in the firearm then the energy is released in all directions from the casing opening. They're like tiny little pipe bombs with a loose end cap. The gunpowder also burns at a slower rate in a fire as opposed to a primer charge. When the heat ignites the gunpowder the bullet will basically "pop" off. Since there is nothing to contain the pressure, the bullet can't fly off at the designed muzzle velocity.
So as a sound effect or distraction, throwing cartridges into a fire can be very effective. That doesn't mean you can't get hurt if you're standing next to the fire (don't try this anywhere) but the bullets won't be traveling with the speed they normally leave the barrel of a gun.So if you are writing a scene where a character throws a handful of small caliber bullets into a fire remember that they act more as a sound effect than anything else.