In the animated TV series, Megatron was created by the Decepticons following their defeat at the hands of the Autobots and was their first transforming robot. Megatron waged war on the Autobots who responded by creating Optimus Prime. The massive war depleted the planet Cybertron of most of its natural energy resources forcing the inhabitants to explore other planets such as the Earth.
The 2005 Transformers movie saw Megatron vs Optimus Prime fighting for control of the Earth, Megatron as invader and Optimus Prime as defender.
Megatron carries a fusion cannon and an energon mace. For even more power he is able to transform and shrink into a modified version of a Walther P38 pistol, a strangely anachronistic yet highly effective weapon.