Megatron (aka Galvatron and C-81) was not always the viciously powerful and brutally direct leader of the Decepticons: he was once brothers-in-arms with Optimus and a student of Sentinel Prime, appointed to be Cybertron's Protector and commander of its Defense Force. But Megatron resented his comrade, knowing he was a Prime and therefore Sentinel's favored son. This anger allowed The Fallen to ensnare him and led to the revival of the Decepticons. Even without The Fallen, it's not hard to imagine that Megatron would have erupted Cybertron into war to rid himself of Optimus.
Megatron tends to become so obsessed with the object of his desires that he can ignore "secondary" matters, glaring flaws in his plans. Otherwise, he likely wouldn't have chased after the AllSpark alone, and spent centuries entombed in the Arctic. Trying to talk Megatron out of blindly going for his goals is useless. He will risk his world, his troops, and even his own spark to achieve his goals; these things do not matter to Megatron. Like his master, Megatron feels a violent hatred towards humans and views them as only slightly above bacteria, a feeling exacerbated by spending decades as their prisoner.
Despite this fatal flaw, Megatron did not achieve his dreaded status through simple warmongering. He's a manipulative, cunning strategist who can plan multiple schemes spanning millennia, and while they may overlap, they all help him towards his one, true goal: the restoration of Cybertron. For all his evils, Megatron genuinely strives to save his home planet some day, and with it, the Cybertronian race: even if it means he has to rule it with his iron fist and put his blood lust to good use to do so.
He can be seen transforming into vehicle mode on the Oasis racetrack along with Sentinel Prime.