Onazaam is the biggest and the most important festival of the state of Kerala. It is a harvest festival and is celebrated with joy and enthusiasm all over the state by people of all communities. According to a popular legend, the festival is celebrated to welcome King Mahabali, whose spirit is said to visit Kerala at the time of Onam. Onam is celebrated in the beginning of the month of Chingam, the first month of Malayalam Calendar (Kollavarsham). This corresponds with the month of August-September according to Gregorian Calendar. Carnival of Onam lasts from four to ten days. First day, Atham and tenth day, Thiruonam are most important of all. Popularity and presentation of rich culture of the state during the carnival made Onam the National Festival of Kerala in 1961. Elaborate feasts, folk songs, elegant dances, energetic games, elephants, boats and flowers all are a part of the dynamic festival called Onam. Government of India has taken due notice of this vibrant and colorful festival. It promotes Onam internationally in a big way and celebrates 'Tourist Week' for Kerala during Onam celebrations. Thousands of domestic and foreign tourists visit Kerala to be a part of Onam. The Legend Story goes that during the reign of mighty asura (demon) king, Mahabali, Kerala witnessed its golden era. Every body in the state was happy and prosperous and king was highly regarded by his subjects. Apart from all his virtues, Mahabali had one shortcoming. He was egoistic. This weakness in Mahabali's character was utilized by Gods to bring an end to his reign as they felt challenged by Mahabali's growing popularity. However, for all the good deed done by Mahabali, God granted him a boon that he could annually visit his people with whom he was so attached.
It is this visit of Mahabali that is celebrated as Onam every year. People make all efforts to celebrate the festival in a grand way and impress upon their dear King that they are happy and wish him well.
According to the Hindu mythology, Mahabali was the great great grandson of a Brahmin sage named Kashyapa, the great grandson of demonic dictator Hiranyakashipu, and the grandson of Vishnu devotee Prahlada. This links the festival to the Puranic mythology of Prahlada of Holika fame in Hinduism, who is the son of demon dictator Hiranyakashyap. Prahlada, despite being born to a demonic Asura father who hated Vishnu, rebelled against his father's persecution of people and worshipped Vishnu. Hiranyakashyap tries to kill his son Prahlada, but is slained by Vishnu in his Narasimha avatar, Prahlada is saved.
The Vamana grew and covered everything Mahabali ruled over in just two paces. For the third pace, Mahabali offered himself, an act which Vishnu accepted as evidence of Mahabali's devotion. Vishnu granted him a boon, by which Mahabali could visit again, once every year, the lands and people he previously ruled. This revisit marks the festival of Onam, as a reminder of the virtuous rule and his humility in keeping his promise before Vishnu. The last day of Mahabali's stay is remembered with a nine-course vegetarian Onasadya feast.Prahlada's grandson Mahabali came to power by defeating the gods (Devas) and taking over the three worlds. According to Vaishnavism mythology, the defeated Devas approached Vishnu for help in their battle with Mahabali. Vishnu refused to join the gods in violence against Mahabali, because Mahabali was a good ruler and his own devotee. He, instead, decided to test Mahabali's devotion at an opportune moment. Mahabali, after his victory over the gods, declared that he will perform Yajna (homa sacrifices) and grant anyone any request during the Yajna. Vishnu took the avatar of a dwarf boy called Vamanaand approached Mahabali. The king offered anything to the boy – gold, cows, elephants, villages, food, whatever he wished. The boy said that one must not seek more than one needs, and all he needs is the property right over a piece of land that measures "three paces". Mahabali agreed.
According to Nanditha Krishna, a simpler form of this legend, one without Mahabali, is found in the Rigveda and the Vedic text Shatapatha Brahmana where a solar deity is described with powers of Vishnu. This story likely grew over time, and is in part allegorical, where Bali is a metaphor for thanksgiving offering after a bounty of rice harvest during monsoon, and Vishnu is the metaphor of the Kerala sun and summer that precedes the Onam. According to Roshen Dalal, the story of Mahabali is important to Onam in Kerala, but similar Mahabali legends are significant in the region of Balia in Uttar Pradesh, Bawan also in the same state, Bharuch in Gujarat, and Mahabaleshwar in Maharashtra. The story is significant not because Mahabali's rule ended, but it emphasizes the Hindu belief in cyclical nature of events, that no individual, no ruler and nothing lasts forever, except the virtues and self-understanding that overcomes all sorrow.