Best: Combiner Wars G1 Megatron
This is arguably the best toy incarnation of G1 Megatron to date. Legal issues aside, this toy has been liberated from the constraints of having to transform into a thin/slender pistol. Having a big chunky tank as an alt mode means that Megatron is free to transform into a big chunky robot. The original G1 Megatron had the most accurate gun proportions, but kinda looked like a chicken in robot mode (and he's the best of the Microman Gun Robos). MP Megatron has a bulkier robot mode, but suffers from also having a "fat" gun mode. It's physically impossible to have both a slender gun and a bulky robot, simply because you cannot shift physical mass in real life. Even Classics Megatron with his fictitious Nerf Maverick gun mode still carries massive alt mode wing-kibble on his back.
CW Megatron has an incredibly awesome sculpt and is well decoed. I really like how they still managed to work in some faux pistol kibble into the robot mode, such as the chest resembling the slide and pistol grips on the legs. Even the rear half of the cannon looks like G1 Megatron's scope/fusion cannon. Nice. I really like how the cannon fires by pulling back, simulating an anti-recoil mechanism. Despite forming the arms, the tank's turret maintains articulation. Additional 5mm weapon ports allow additional guns to be attached, much like on a real tank. The detailing on the overall sculpting of this toy is exquisite, and to top things off, it has rubber treads that
roll!

They've even included bonus stickers for additional G1 toy accuracy, as well as an Autobot insignia for those who want to replicate Megatron's current allegiance in the comics.
We know that Megatron cannot be a gun, but a tank is a really suitable substitute because he still transforms into a
weapon. And objectively speaking -- if we remove our rose-tinted G1 nostalgia glasses -- a tank is actually way cooler than a pistol. Cos tank > pistol! There's also the fact that Megatron always needs someone to
hold him whenever he transforms. Sheesh!
But if you really want, apparently there's a
fan-made gun mode (I've never personally tried it).: