Mahishi was the sister of the asura named Mahishasura. In her previous birth, she was the wife of Dattathreya who was the incarnation the trimurthis. Over her actions, Dattathreya once cursed his wife Leelavati to take birth as Mahishi as the sister of Mahishasura. After birth, she was made the Queen of Asuras.
Her brother Mahishasura was once blessed with the boon of invulnerability to all men. However, he went to create a ruckus in the three worlds and hence the Devas combined their powers to create Goddess Durga. She in turn killed the deadly asur, Mahishasura.
It is through this incident that Goddess Durga is called Mahishasura Mardhini (The woman who ended Mahishasura). The death of her brother left Mahishi furious that all the Gods have plotted to kill her beloved brother.
In anger, she began to perform a Tapasya to please Lord Brahma. She was given the boon of ruling the universe and being invulnerable except to a being that had not been born from a woman's womb. Such a being never existed and hence left her arrogant. She hence began conquering and plundering the world.
Meanwhile, an asura named Basmasura was blessed with any boon he wished, from Lord Shiva. Basmasura asked for the boon that anything and everything he touched would burn into ashes.
Lord Shiva gave him the boon he wished for. Later on, he wanted to test his boon on Lord Shiva. This left Lord Shiva worried and he had Basmasura after him trying to test the power of his boon.
Lord Shiva then called for the help of lord Vishnu and hid himself in in the inside of a Peepal tree while basmasura was in search of him. Upon learning about these series of events, Lord Vishnu took the form of a female named Mohini. Mohini literally means enchanting woman. Lord Vishnu is said to have done so in an attempt to stop Basmasura.
At the very sight of lord Vishnu as Mohini, Basmasura fell for her. He tried many ways to impress her. Knowing about his boon, Lord Vishnu as Mohini, asked Basmasurs to hold his hand over his head and vow fiercely.
As anything he touched was to be burnt into ashes, Basmasura was reduced to ashes. This way Lord Vishnu's lesser popular incarnation as a female, saved Lord Shiva from Basmasura.
Later on, when Lord Vishnu met lord Shiva, he explains him the whole scene and how Basmasura ultimately turned into ashes and that he was then safe. Lord Shiva in delight, asked lord Vishnu if he could see the form of Mohini. Lord Vishnu then appears as Mohini and this leaves Lord Shiva mesmerized.
The union of the two Gods was called 'Harihara' where Hari was lord Vishnu and Hara was Lord Shiva. This justifies the name 'Harihara' to Ayyappa.
The baby boy born combined in himself, the powers of both the gods – Vishnu and Shiva. This baby was Ayyappa. He was known to be born for a divine cause. This was to eliminate Mahishi and then become the cause of her attainment of Moksha.
The gods placed the baby near the banks of the River Pampa and left to Heaven. Meanwhile, King Rajashekhara who was the childless king of the kingdom Pandalam, was up for a hunt near the river with his men.
They then hear the cries of a baby from somewhere near. After searching, they find a beautiful and divine baby boy. It is believed that at this point, a saint appeared and addressed King Rajashekhara.
The saint asks him to take the baby to palace and that when the child turns twelve, he would know the divine reason and his history. Saying this, the saint disappears.
The King then takes the baby back to his palace and explains how the baby was found to his Queen. The Royal couple was delighted as they had been praying Lord Shiva for a baby and now, they were blessed with a baby.
The kingdom was happy to have their heir at last and everything prospered with the arrival of Ayyappa. He was named Manikanta. Soon after king Rajashekhara adopted Ayyappa, his own biological son Raja Rajan was born.
Both the boys grew up as princes. However, Ayyappa grew up to excel at martial arts and Vedas while the Guru himself was surprised at his abilities and other extraordinary talents. He suspected of the divine nature of Ayyappa.
After the completion of his studies under his Guru, Ayyappa was to offer Guru-Dakshina (fee to the teacher) to his Guru.
The Guru tells him that he himself was blessed having sucha divine child as his student. Knowing that Ayyappa was a divine child, his Guru makes a request to Ayyappa.
He asks him for the blessing of sight and speech for his blind and dumb son. Just as Ayyappa placed his hand over the head of the Guru's child, he was blessed with vision and speech. Such were the powers of Ayyappa!