The plot could be about a power struggle. Megatron wants total control over Cybertron, but Optimus Prime stands in his way. However, instead of just fighting, there are political intrigues involved. There could be other characters influencing their decisions. Maybe some Autobots who think Optimus is being too soft on Megatron, and some Decepticons who think Megatron is being too cautious.
It could be a story of redemption. Megatron realizes the error of his ways and tries to make amends. Optimus Prime is skeptical at first but eventually decides to help him. This journey of Megatron's redemption could involve them facing many challenges together. They might have to fight against those who don't believe Megatron can change, both from the Autobot and Decepticon sides.
In a fanfic about Optimus Prime x Megatron, their relationship could be explored in a more philosophical way. For example, they might debate the nature of good and evil, power and responsibility. Optimus believes in protecting all life, while Megatron has his own ideas about power and how it should be used. This kind of fanfic could show how their different viewpoints could either bring them closer together or drive them further apart.
A great angle for a Megatron x Optimus Prime fanfic could be a body - swap situation. They are forced to inhabit each other's bodies due to some alien technology gone wrong. This leads to them having to understand each other's perspectives on a whole new level. They start to see the reasons behind their actions in the past and develop a new - found respect for one another.
In a Megatron x Optimus Prime fanfic, the story could also be about a power struggle within themselves. Megatron is tempted by an ancient power source that could give him ultimate control. Optimus Prime tries to stop him not as an enemy but as a friend who is worried about Megatron's well - being. Their interactions are filled with emotional turmoil as they try to balance their friendship with their duties.
There could be a fanfiction where a strange energy source affects Optimus Prime and Megatron, causing them to swap personalities or abilities. This would be a humorous yet also thought - provoking plot. They would have to navigate their new selves while still trying to lead their factions. The Autobots would be confused by an aggressive Optimus and the Decepticons would be equally bewildered by a more pacifist Megatron.
One plot idea could be that Megatron and Optimus Prime are forced to team up in an alternate dimension. They have to put aside their differences to face a common enemy that is threatening the very fabric of that dimension. Maybe it's an ancient evil that has the power to destroy all Cybertronians.
You can try looking on some fanfiction websites like Archive of Our Own (AO3). It has a large collection of Transformers fanfictions, and there might be some related to Optimus Prime and Megatron in the MPreg genre.
It can also be appealing from a creative writing perspective. Writers can play with the personalities of the characters in this new and strange scenario. For example, how would Optimus Prime react to Megatron being in such a state? And vice versa. It gives a whole new layer to their complex relationship.
In a fanfiction where they unite, it could start with a common threat that neither side can face alone. For example, an alien race invades Cybertron. Megatron and Optimus Prime realize that their brotherly bond is stronger than their differences. Together, they could form a new strategy, using both Autobot and Decepticon forces in a coordinated way to repel the invaders.
A really cool fanfiction I read had Female Optimus Prime and Megatron in an alternate reality. They were both outcasts in their own worlds. They formed an unlikely alliance and the story focused on their journey together. It was full of action and also some really sweet moments where they showed that they cared about each other's well - being, despite their past enmity.
One possible storyline could be a redemption arc for Megatron. In this fanfiction, Megatron, after countless battles with Optimus Prime, begins to question his motives. He realizes the destruction he has caused and tries to make amends. Optimus, initially skeptical, gradually sees the change in Megatron and they form an uneasy alliance to face a greater threat that endangers both Autobots and Decepticons alike.