Unicron is an ancient evil that serves no master.
Unicron's early history is unknown, as he simply appeared and began destroying planets one by one. When he approached the world of Cybertron, a united force of Autobots and Decepticons were there to meet him. The army defeated the goliath, destroying everything but his head. This remained in orbit around Cybertron as a grisly monument to Unicron's rampage.
Several years later, a Decepticon attempted to reactivate Unicron. He succeeded, and promised Unicron a body if he would help him controlled Cybertron. Unicron killed him, and merged his remains with the Decepticon, creating a behemoth that dwarfed most Transformers, but was tiny compared to his old body.