Ursa's plan to save her children failed. Whatever it had been, Azulon somehow thwarted it. And Ursa was instantly executed. In Azulon's rage, he ordered that Ozai and all his dishonorable bloodline be killed, and it was only through a last minute intervention by influential members of the government that Azula and Zuko were spared at all. The reasoning was that, if Iroh died without an heir, as was possible, Ozai's children would have to inherit the throne in order to continue the war as well as the Fire Lord's bloodline; more sinisterly, many of the ministers were supporters of Ozai, and knew that Iroh's eventual rule would be detrimental to their own ends. A child of Ozai, on the other hand, could be shaped and groomed to be a useful puppet who would surely continue the war and advance all of their fortunes. Azula, in particular, seemed much more her father's child than Zuko, who was seen even as a child as a weak-willed boy by Ozai.
However, the Fire Lord Azulon vowed that as long as he lived, both of Ozai's children would be considered blood-traitors and banished from the capital; both were sent to remote fortresses and watched like hawks. Soon enough it was his favorite grandchild, whose increasingly violent behavior after her father's death began to filter in from spies sent to watch over her, that caused Azulon the greatest concern for his well-being and that of Iroh's - the girl was already a prodigy and was fast showing signs of firebending strength that potentially rivalled the Fire Lord's power, including a blue flame and even charges of lightning. It was also well-known that she had loved her father and had been his darling, showered with acclaim and love by him and his supporters. When Azula finally attacked her guards and spoke of killing the person responsible for her father's death - knowing full well it was her grandfather - Azulon's heart fully hardened against the girl, and he ordered her taken to the one place he felt could deal with her, her powers and her treasonous behavior - the Boiling Rock. She was barely ten when she was brought to the prison, and his actions shocked even his staunchest supporters, but the Fire Lord believed that Azula was fast becoming the most dangerous threat to the stability of the realm.
The next four years she spent in the prison would prove Azulon correct. The princess soon after her father's death had lost much of her grip on what sanity she had possessed, but had lost nearly none of her genius; in prison it turned easily into a paranoid, delusional brew of intelligence, remorselessness, cruelty and hate. she believed the world was out to get her, that everyone had been against her father and thus her, and it was only fair she return the favor in whatever way she could. What would have broken most normal men in the Boiling Rock instead twisted Azula; the suffering she endured only strengthened her psychosis. She delighted in using her firebending and her burgeoning lightning against guards and prisoners alike, knowing the massive amounts of damage she could do and all of the attention she could receive before being taken into confinement. Even in the cold confinement that rendered her powers useless, she dreamed of burning, searing, and killing in any way she could, all who had wronged her, and forcing those she let live to still pay dearly. In time only the most seasoned and best-trained firebenders could properly control her, and even then with difficulty.
The outside world, meanwhile, changed as well, but entirely unlike Azula. The period of mourning, easily forgotten in other worlds by Ozai, slowly reached its full height without him. The loss of the heir and the botched result of Ozai's machinations, after so many years of success, demoralized most of the War's supporters in the Fire Nation, where before they had once derided Iroh for his decision to withdraw. Though Azulon attempted to order a second siege on Ba Sing Se, the result cost even more lives and resources than the first had, and Earth Kingdom rebels took the opportunity of the failed siege to fight back more ferociously than before, even taking back lands that had been conquered for several generations. The Nation's troops and people began to despair over the permanently shattered myth of their invincibility; where before people were talking about domination and victory, there was now the fear of total defeat and even subjugation by the Earth Kingdom and the Northern Water Tribe. Many even began to think and wonder, voicing questions as to why they were still fighting a war that started before many of their grandparents were even born. Soon only the most radical were still speaking of total victory, blind to the rapidly-changing situation.
Soon enough Azulon died, and Iroh became Fire Lord. His first action was to retreat from Ba Sing Se and consolidate and retain the lands won by the Fire Nation during the war, resulting in a stalemate. However, Iroh's long-term plan was in fact to fully change the people's already-disillusioned hearts towards peace, restore the conquered lands to their rightful owners, and end the war for good. He also wished to ensure that those from the Fire Nation who had made settlements in the Earth Kingdom had a choice to stay or leave. Most importantly he recalled Zuko to the capital, and installed him as heir. In fact, by this time Iroh had become disheartened by the idea of being Fire Lord, his philosophy having changed considerably since his son's death. Zuko, meanwhile, had been growing to become a fair and decent man even in exile, and only wished to do what was best for good and honor of the nation and its people, as opposed to personal glory. It was decided that after Zuko's education and training was finished in several years' time, Iroh would step down and Zuko would become Fire Lord, and in the changing climate of the Fire Nation, this was accepted and welcomed by nearly everyone.
Almost, but there were still those few war-hungry nobles, generals and industrialists who dreamed of total war and saw Iroh's sudden ascendence as a threat to their own positions and power. They remembered Ozai's promise of strength and ridiculed Iroh's seeming softness. And then there was Ozai's younger child, who had once been the apple of her father's eye. If they could get her out of the Boiling Rock, and convince her to join them, they could easily de-stabilize Iroh's grip on the throne and take over. And of course it was assumed that Azula, still young, still impressionable, would be grateful for the throne and the restoration of her power, and bow to her allies' demands for more war. So they began to smuggle people into the prison to pay Azula, now fourteen, their respects and to try and convince her to bid for the throne. Then it would only be a matter of planning the perfect time to escape. It helped that the Warden of the Boiling Rock seemed to be willing to aid them in their quest.
The princess, suddenly shown the respect and adulation she had lacked after four long years, seemed to need little convincing and agreed that she should be the Fire Lord, and that the war would continue under her reign. Nor did she have any scruples about overthrowing her own brother and uncle, having fantasized about it for years, especially now that Zuko, who she always hated for having her mother's love, was being shown favor instead of her. Azula's new supporters, however, could have scarcely comprehended what those in the prison who became privy to their plans tried to warn them about: that by this time Azula was a crazed, angry, vindictive and hateful young woman, a true monster who hated and distrusted everyone. She loved the attention she was getting and the fact she was being given an opportunity to incite violence; in truth she was manipulating those who saw her as a potential puppet as much as, if not more than, they were her. The 'Fire Nation's last hope' was just as dangerous to them as she was to Iroh and her brother. Even the prison's Warden knew the danger of letting this particular prisoner, who defied him even under torture, free, though the potential rewards that waited his family (given that his favorite niece, Mai, had been known to be a childhood friend of the princess's) for aiding in the coup eventually proved more powerful than his scruples.
Unfortunately, Azula's new supporters only saw what they wished to see, and began to bide their time for Azula's escape. The time finally did come, for the most unexpected reason: the Avatar, the spirit of the planet that was long thought dead, was uncovered under an iceberg in the Southern Pole. His return a sign that the war was about to end and their fortunes about to fall, the conspirators learned that Iroh and Zuko planned to invite the re-awakened Airbender to the Fire Nation capital to discuss options on how to end the war. Realizing there was no time to lose, Azula's allies made their way to the Boiling Rock in order to free the waiting Azula.
And it's at this time she disappears, to wreak havoc on the nexus.
Several key differences in this AU from canon not mentioned in the above include:
-Azula has a great control over fire, but can only control lightning to a limited extent in comparison to canon. Because she has used lightning repeatedly without the control needed to properly harness it, she has burn scars on her fingers, arms and hands, making them look slightly deformed and miscolored. She has other scars from various beatings given to her by prison guards, mainly on her back, but it's the fingers and hands she's...sensitive about to remarks on.
-With the obvious exception of Zuko and Iroh, Azula does not know any of the characters from Team Avatar. She wouldn't know them from flies on the wall.
-Almost forgot. This Azula does hallucinate her mother, much like her canon counterpart does. Hence the mother icon. She of course doesn't like the idea her mother is possibly 'alive' (even though she's really dead) and the hallucination's existence is a testament to the long-time questionable sanity of this particular Azula. It's also likely that people in the prison are aware that she thinks her mother is 'there' at times.