Birth
According to Hindu legends, Hanuman was born to mother Anjana and father Kesari. Hanuman is also called the son of the deity Vayu (Wind god) because of legends associated with Vayu's role in Hanuman's birth. One story mentioned in Eknath's Bhavartha Ramayana (16th century CE) states that when Anjana was worshiping Vayu, the King Dasharatha of Ayodhya was also performing the ritual of Putrakameshti yagna in order to have children. As a result, he received some sacred pudding (payasam) to be shared by his three wives, leading to the births of Rama, Lakshmana, Bharata and Shatrughna. By divine ordinance, a kite snatched a fragment of that pudding and dropped it while flying over the forest where Anjana was engaged in worship. Vayu, the Hindu deity of the wind, delivered the falling pudding to the outstretched hands of Anjana, who consumed it, leading to the birth of Hanuman.
The Ramayana locates the birthplace of Hanuman in Kishkinda. Anjaneri in Nasik, Maharashtra along with Anjeneri Anjanadri (Near Hampi) in Gangavathi Taluk Koppal District, Karnataka is one of a number of places that claim to be the location of Kishkinda.
Childhood
According to Valmiki's Ramayana, one morning in his childhood, Hanuman was hungry and saw the rising red-colored sun. Mistaking it for a ripe fruit, he leapt up to eat it. In one version of the Hindu legend, the king of gods Indra intervened and struck Hanuman with his thunderbolt. It hit Hanuman on his jaw, and he fell to the earth dead with a broken jaw. His father, Vayu (air) - states Ramayana in section 4.65 - became upset and withdrew all the air on Earth. The lack of air created immense suffering to all living beings. This led lord Shiva to intervene and resuscitate Hanuman, which in turn prompted Vayu to return to the living beings. As the mistake was done by the god Indra, he grants Hanuman a wish that his body would be as strong as Indra's Vajra, and that his Vajra can also not harm him. Along with Indra other gods have also granted him wishes: the God Agni granted Hanuman a wish that fire won't harm him; God Varuna granted a wish for Hanuman that water won't harm him; God Vayu granted a wish for Hanuman that he will be as fast as wind and the wind won't harm him. Lord Brahma also granted Hanuman a wish that he can move to any place where he cannot be stopped; Lord Vishnu also grants Hanuman a weapon named "Gada". Hence these wishes make Hanuman an immortal, who has unique powers and strength.
In another Hindu version of his childhood legend, which Lutgendorf states is likely older and also found in Jain texts such as the 8th-century Dhurtakhyana, Hanuman's Icarus-like leap for the sun proves to be fatal and he is burnt to ashes from the sun's heat. His ashes fall onto the earth and oceans. Gods then gather the ashes and his bones from land and, with the help of fishes, re-assemble him. They find everything except one fragment of his jawbone. His great-grandfather on his mother's side then asks Surya to restore the child to life. Surya returns him to life, but Hanuman is left with a disfigured jaw. Hanuman is said to have spent his childhood in Kishkindha.
Some time after this event, Hanuman begins using his supernatural powers on innocent bystanders as simple pranks, until one day he pranks a meditating sage. In fury, the sage curses Hanuman to forget the vast majority of his powers. The curse remains into effect, until he is reminded of his powers in his adulthood.
Adulthood
Ramayana
There is quite a lot of variation between what happens between his childhood and the events of the Ramayana, but his story becomes much more solid in the events of the Ramayana. After Rama and his brother Lakshmana, searching for Rama's kidnapped wife, Sita, arrive in Kishkindha, the new king, and Rama's newfound ally the monkey king Sugriva, agree to send scouts in all four directions to search for Rama's missing wife. To the south, Sugriva sends Hanuman and some others, including the great bear Jambavan. This group travels all the way to the southernmost tip of India, where they encounter the ocean with the island of Lanka (modern day Sri Lanka) visible in the horizon. The group wishes to investigate the island, but none can swim or jump so far (it was common for such supernatural powers to be common amongst characters in these epics). However, Jambavan knows from prior events that Hanuman used to be able to do such a feat with ease, and lifts his curse.
The curse lifted, Hanuman now remembers all of his dynamic divine powers. He is said to have transformed into the size of mountain, and flew across the narrow channel to Lanka. Upon landing, he discovers a city populated by the Lanka king Ravana and his demon followers, so he shrinks down to the size of an ant and sneaks into the city. After searching the city, he discovers Sita in a grove, guarded by demon warriors. When they all fall asleep, he meets with Sita and discusses how he came to find her. She reveals that Ravana kidnapped her and is forcing her to marry him soon. He offers to rescue her but Sita refuses, stating that her husband must do it (a belief from the time of ancient India).
What happens next differs by account, but a common tale is that after visiting Sita, he starts destroying the grove, prompting his capture. Regardless of the tale, he ends up captured in the court of Ravana himself, who laughs when Hanuman tells him that Rama is coming to take back Sita. Ravana orders his servants to light Hanuman's tail on fire as torture for threatening his safety. However, every time they put on an oil-soaked cloth to burn, he grows his tail longer so that more clothes need to be added. This continues until Ravana has had enough and orders the lighting to begin. However, when his tail is lit, he shrinks his tail back and breaks free of his bonds with his superhuman strength. He jumps out a window and jumps from rooftop to rooftop, burning down building after building, until much of the city is ablaze. Seeing this triumph, Hanuman leaves back for India.
Upon returning, he tells his scouting party what had occurred, and they rush back to Kishkindha, where Rama had been waiting all along for news. Upon hearing that Sita was safe and was awaiting him, Rama gathered the support of Sugriva's army and marched for Lanka. Thus begins the legendary Battle of Lanka.
Throughout the long battle, Hanuman played a role as a general in the army. During one intense fight, Lakshmana, Rama's brother, was fatally wounded; it was thought that he would die without the aid of an herb from a Himalayan mountain. Hanuman was the only one who could make the journey so quickly, and was thus sent to the mountain.
Upon arriving, he discovered that there were many herbs along the mountainside, and did not want to take the wrong herb back. So instead, he grew to the size of a mountain, ripped the mountain from the Earth, and flew it back to the battle. This act is perhaps his most legendary among Hindus. A chunk of this mountain was said to be fallen down while carrying and the present day “Mount Roomassala” is believed to be the fallen piece.
In the end, Rama revealed his divine powers as the incarnation of the God Vishnu, and slew Ravana and the rest of the demon army. Finally finished, Rama returned to his home of Ayodhya to return to his place as king. After blessing all those who aided him in the battle with gifts, Rama gave Hanuman his gift, who threw it away. Many court officials, perplexed, were angered by this act. Hanuman replied that rather than needing a gift to remember Rama, he would always be in his heart. Some court officials, still upset, asked him for proof, and Hanuman tore open his chest, which had an image of Rama and Sita on his heart. Now proven as a true devotee, Rama cured him and blessed him with immortality, but Hanuman refused this and asked only for a place at Rama's feet to worship him. Touched, Rama blessed him with immortality anyway. Like Shesha Nag, Hanuman would live on after the Kalpa (destruction of the universe).
Mahabharata
Centuries after the events of the Ramayana, and during the events of the Mahabharata, Hanuman is now a nearly forgotten demigod living his life in a forest. After some time, his spiritual brother through the god Vayu, Bhima, passes through looking for flowers for his wife. Hanuman senses this and decides to teach him a lesson, as Bhima had been known to be boastful of his superhuman strength (at this point in time supernatural powers were much rarer than in the Ramayana but still seen in the Hindu epics). Bhima encountered Hanuman lying on the ground in the shape of a feeble old monkey. He asked Hanuman to move, but he would not. As stepping over an individual was considered extremely disrespectful in this time, Hanuman suggested lifting his tail up to create a passage. Bhima heartily accepted, but could not lift the tail to any avail.
Bhima, humbled, realized that the frail monkey was some sort of deity, and asked him to reveal himself. Hanuman revealed himself, much to Bhima's surprise, and the brothers embraced. Hanuman prophesied that Bhima would soon be a part of a terrible war, and promised Bhima that he would sit on the flag of his brother Arjuna's chariot and shout a battle cry for Bhima that would weaken the hearts of his enemies. Content, Hanuman left his brother to his search, and after that prophesied war, would not be seen again until early 1600s.