Mohini is also one of the Dasavtar of Vishnu.
Long long ago Indra The king of Devtas was ridding on his Elephant. Rishi Durvasa ( a sage) saw Indra and he offered him a garland.Indra accepted the garland with a smile and placed it on the trunk of his elephant. The elephant got irritated by the scent of the garland and he threw it on the ground, seeing this the enraged sage Durvasa Cursed Indra and all Devatas to forget their Divya Shakties( Divya means Devine ans Shakties means Powers). In such a condition the Daanavas ( rivals of Devtas ) attacked the Havens and conquered the whole universe . The helpless Devatas went to Lord Vishnu for help. Vishnu advised them for Sagar Manthan .(click here to know the full story of Sagar Manthan)
Sagar Manthan was suppose to be done by both Devtaas and Daanavas. So Devtaas came into alliance with Asuraas (danavaas) for Sagarmanthan and share Amrit (the nectar of immortality ) . Vishnu promised to do justice for Devtaas.
while Samundar Manthan Dhanvantri (the havenly Physician ) emerged out of the ocean with the pot full of Amrit . seening the Nector Pot Devtaas and Danvaas started fighting . Garuda took the devine pot and flew to Vishnu.
Vishnu took the Avatar of Mohini .
Mohini was a lady with divine beauty . Mohini came with the Amrit pot to the battle place and she suggested devtaas and danavaas to sit in different row, so that she can distribute Amrit among them all the Devtaas and Daanavas agreed. Mohini started to distributed The Amrit from Devtaas . One Danav Rahuketu sat in the row of devtaar and Drank the Amrit. The Sun God and the Moon God noticed him and they informed Mohini by that time Rahuketu already drank the Amrita mohini Cutt off his head with Sudarshan Chakra . Rahuketu could not die but his head was seprated from his body , his head came to be called as Rahu and his body Ketu.
Know the Devtaas were immortal so they fought for their Heavens from Danvaas.