The Mirage of those days was human at the time, and a poor woman who was able to convince the high priests to give her a high ranking job based on her uber-zealous devotion to the gods. The high priests at that time, Hotep and Huy, were too greedy and foolish to reconsider, so they accepted her offer instead, and set her up as the main priestess of Bastet and Sekhmet. What no one had realized was that Sekhmet and Bastet were one and the same, and that Chernabog had chosed Mirage to become Sekhmet's host when the time was right. So, he subtly corrupted Mirage, causing her devotion to make her bloodthirsty and ruthless, constantly demanding sacrifices to the gods. A sorceror from Agrabah named Phasir had heard of the great priest, and sailed to Egypt, hoping to help her see the error of her ways. At first, Mirage seemed to fall in love with Phasir, but in the end, her devotion to Sekhmet won her over.
Now, when the Cartoonian War reached Egypt, and her world was rocked by the skeletal forces of Seth, she prayed to Sekhmet to give her the strength to repel the invaders away from her land. This was the moment Chernabog had been waiting for. So, the great demon lord used his dark magic to give Mirage the Mask of Bastet, persuaded her to put it on, and watched the darkness consume her heart. The Mask transformed her into the living avatar of Sekhmet/Bastet, to which Mirage believed herself to be the goddess' primary tool in bringing destruction to all humans who disrespected her. The Mask also gave her the Egptian Pride keyblade to serve as her main weapon. Mirage then set out to repel Seth's forces and send them away, but in return, all of Egpyt would have to worship her as their main goddess, if not, then she would destroy their world in a blaze of plagues.
Phasir, having reached word of Mirage's transformation and new demeneor, was horrified at this turn of events. He rushed back to Egpyt to try and persuay Mirage from the darkness back into the light. But Mirage's hate had become too powerful, and she cursed the cycloptic mage into spirit form for even thinking of trying to change her rule. But what Mirage did not foresee afterwards was the Roman conquering of Egypt, forcing her out of her world. The Cat sorceress did not care, now that she had the powers of a goddess, she could begin her mission to bring strife, pain, and misery to all worlds, believing it to be the will of Sekhmet. This began a long campaign of Mirage, with help from Chernabog, bringing misery to the worlds just for the evulz. It was during this campaign that the young Iago first heard about Mirage and her evil ways, to which he and his brother, Othello, realized that she was the new evil incarnate, the previous one having been destroyed by Mirage in a fit of jealousy.
Now it has been a given that Mirage did not encounter Aladdin until the series which take place after the movie, that Spongebob and his friends went on an adventure of. But Mirage was also said to be the Mask of Bastet combined with Queen Kanji over 11 years ago during the events of KH BBS, to which she later encountered Spongebob in Alice in wonderland! Coupled with Iago's knowledge of her, then that makes Mirage one of the most complicated villains in the series. How do we explain that, Sherlock?!
Well, you see, the events of Aladdin the series take place in an alternate universe where Iago did not join the Shell Louge Squad, a.k.a the Pooh and Littlefoot adventures universe, but Mirage on that series was of the main universe, who had come to that dimension to wreak havoc on that world. She battled the Aladdin of that universe about 6 times before realizing with disgust that he could not be defeated at all. In anger, she was about to destroy that world before Phasir, who had followed her from the main universe, used a powerful magic spell to turn Mirage back into the Mask of Bastet, and throw her back into the main universe around the time of KH BBS, so that she would not cause havoc in the present. But by that point, Malefor had taken over Chernabog's position of Big Bad, and the second war was already in progress. Malefor realized that in his current state, he wouldn't be able to sire a child to continue his evil legacy. That's when he heard about Mirage, her past and conquest mission in our universe, and her constant desire to destroy Aladdin in the Pooh universe from word of several Skeleton ghosts in his employ. Seeing her as the perfect canditate for an adoptive child, he ordered Cobra to kidnap Queen Kanji, the second fairest woman of all, knock her unconscious, find the mask of Bastet, and use it and Kanji's body to bring back Mirage from her imprisonment from within the mask. At this point, Mirage had been furious at being imprisoned within the mask. Determined not be with someone else in torture, a.k.a the true Sekhmet, she did the unthinkable and absorbed Sekhmet/Bastet within her being, and fully became a true chaos goddess of Egpyt. Just as she was beginning to grow mad from her time in prison, Mirage suddenly felt herself becoming corporeal and woke up from her long sleep to discover herself physical and in a new body. Phasir's spirit rushed over to find out the news of Mirage's return, but was locked away within the body of King Aaron, who's strong will to survive allowed himself to assumed Phasir's form, but still retain his memories of being the king. The rest is, as they say, history. Currently, Mirage's soul continues to possess Kanji's body as long as her unwilling host continues to wear the Mask, but there may be a way for Kairi, Kanji's daughter, to free her mother from her possession, as well as give Mirage her old body back in the process, maybe even freeing Baset as well.