Your villain is just going to commit a very elaborate and probably expensive suicide, and his target will be dead as a collateral effect.

A magnetic field is effective at keeping away only moving charges. Most of the matter we have at sea level is in neutral state, including air, hands of whoever is loading that gun, the gun itself and the building where the sniper is hiding.

Even assuming that somehow the bullet can leave the rifle, we can rephrase this [What If][1] to get an idea of what happens (the bullet in your case is non relativistic, but it's generating gamma rays anyway)

I am quoting the content of that page, just editing the relevant part to suit your case (in italics)

> These gamma rays and debris expand outward in a bubble centered on the *rifle exit*. They start to tear apart the molecules in the air, ripping the electrons from the nuclei and turning the air [...] into an expanding bubble of incandescent plasma. The wall of this bubble approaches the *target* at about the speed of light[...]

> The constant *annihilation* at the front of the *bullet* pushes back on it, slowing it down, as if the *bullet* were a rocket flying tail-first while firing its engines.


  [1]: https://what-if.xkcd.com/1/