Sounds like a railgun.
A railgun creates a closed electrical circuit between two rails and the projectile. Current flows up the positive rail, across the projectile, and down the negative rail causing the whole thing to behave like an electromagnet. This creates a circular magnetic field around the rails and the resulting Lorentz force propels the projectile.
Railguns have many advantages over chemically propelled (ie. gunpowder) weapons. High velocities are achieved by creating extremely high pressures behind the projectile. These high pressures are due to the very rapid expansion of gases from the heat generated by the gunpowder. The velocities are limited to how much pressure the barrel can withstand, how tight the seal is around the projectile to prevent gas leakage, and how fast your gas is expanding; at a certain point, the bullet outruns the explosion.
In contrast, a railgun does not use pressure but magnetic force. It is not limited by the speed of the explosive, pressures the barrel can withstand, nor the tolerances of the barrel and projectile. It does introduce a whole new set of problems including power delivery, your rails being bent by the magnetic force (there's as much force trying to shove the rails apart as there is shoving the projectile), and your components melting from all the electricity you're pumping through them and the friction of the projectile running along the rails.
High velocity is important in projectiles for three reasons: it increases their range, it makes it easier to aim (less drop to account for), and it makes it pack a bigger wallop. The kinetic energy of a projectile is linear with weight, but exponential with velocity. Making a bullet twice as heavy gives it twice the punch, but fire it at twice the velocity and you deliver four times the punch. Modern kinetic penetrater anti-tank rounds are built around this principle: if you fire a high density dart at something fast enough, it will slam into it with so much energy it will melt the armor so fast it will cause an explosion.
Several militaries are developing railguns. Right now they're quite large and consume a lot of power which means they're mostly for anti-ship or anti-armor purposes. The US Navy demonstrations are impressive. Many Navy ships are undergoing big upgrades to their electrical systems for the expected power requirements (also computers). The US Navy is using a similar idea to railguns to launch aircraft instead of the traditional steam catapults.
Hand held weapons are a way off. The main problem is power density. Until you can make the batteries as light and compact as a clip of ammunition, you won't see railgun battle rifles. What you might see first is a light vehicle mounted railgun-based anti-armor weapon. With the vehicle's power system or an auxiliary generator to call on, you could mount a railgun on a Humvee or Stryker. This would replace the missile systems now in use. A railgun would have a much larger range, more destructive potential, better accuracy, and can carry far more ammunition. This would give mechanized infantry the punch of a tank without the tank. Mostly it would be for bunker-busting, but if an armored vehicle shows up it would be able to destroy it at extreme range.
As an aside, what people often think of as a "railgun" is actually a coilgun. They also use electromagnetic energy to propel the projectile, but retain the barrel and accelerate the projectile using an external magnetic field. Neither the projectile nor the barrel are part of the circuit.