Just an idea I got from a conversation with Aragorn II Elessar.
Jaime hadn't known when the dreams had started. Sometime after he'd been branded the Kingslayer, for sure.
He could see a boy. A cripple. A cripple with powers. The boy could apparently control animals and even people. Jamie did dimly remember there were tales of people being able to do just that.
But the dreams were not limited to just those. Jaime would wake up after long nights of terror, watching as the boy attempted to take control of people, only to instead drive them mad. One such person was the Mad King. Jaime would never forget the horror of watching the Mad King, once so full of life, a kind and fair man who was even friends with his father, turning into the paranoid, delusional, cruel man Jaime had been force to put down.
And that wasn't even the worst of it. Jaime dreamed of King's Landing in flames, innocent people dying. And somehow, he knew it was the fault of the boy.
Jaime wasn't sure why he was having these horrible dreams until one day, in King's Landing, he saw the boy, when his sister's drunken oaf of a husband dragged them to King's Landing. Then he saw the boy, Bran Stark. Oh, he still had his legs and was far younger, but it was undeniably the boy.
Jaime tried to ignore this, dragging his sister up to one of the towers at Winterfell to distract him from thoughts of the boy. Only the boy found them, having climbed up the tower.
As he held the boy in his hand, Jaime knew what he had to do. The dreams had been preparing him for this moment. To stop the madness, to stop all the death. As he watched the boy plummet to the ground, Jaime hoped the boy would die quickly. His suffering would end, and then the suffering of everyone would be averted.
There's a theory that Bran is the reason that Aerys turned into the Mad King by doing to him what he did to Hodor. If true, that makes Bran the overarching villain of ASOIAF and Jaime the hero who tried to stop Bran's mad rampage. And this is just how it turned out. Hope you all enjoyed it.
