In Treta Yuga, When King Sagara of the suryavamsa decided to perform the ashvamedha yagna. Lord Indra became fearful of yagna, stole the horse and tied it i next to hermitage of Sage Kapila.
King's attended discovered the sacrificial horse had gone missing. The king therefore ordered his 60,000 sons to go find the horse. The arrogant princes went about burning and destroying places in their quest to find the horse. Finally they came to Sage Kapila’s hermitage. They found him in meditation and the horse tied next to him.
Sage Kapila was, with yoga power, above the earth. They thought this is the culprit, and set fire underneath. His bottom started heating up, and he opened his eyes; and when he opened his eyes, all the princes became ashes.
The king kept wondering, “What happened to my children? They are not coming back.” He sent his son, Amsuman. [Prince Amsuman met Sage Kapila and learnt of the whole event. It was the sage’s counsel that if Amsuman wanted his brothers back, he must perform the cremation rites of washing the spot where they were turned to ash, with the holy waters of the Ganga available only in heaven.
Throughout his life prince Amsuman struggled to bring Ganga down. He said, “Until Ganga flows on their ashes, they are not going to get liberation.” And he died. Throughout his life he struggled, but nothing happened. Then came his son Bhagiratha. Bhagiratha prayed, prayed, prayed, prayed. Ganga was sitting in a big Kamandal in Brahmaloka, and he prayed to Brahma, “Please release it.”
Brahma said, “It cannot be released like that. When Narayana (Vishnu) takes Vamana Avatara, he will become Visvarupa; and his feet will touch all the three worlds and his toes will topple down the Kamandal and the Ganga will flow down. Then only you will get it.”
Bhagiratha was waiting for Vamana Avatara. You can imagine how many births he had taken; God only knows. And Vamana Avatara took place, and the toe of Vishnu touched that Kamandal and it turned upside down. The whole thing fell down. And Brahma said, “Now it will go to Patala. Its force is such that you will not get the Ganga here. It will go to the nether regions. So you must do something to prevent it from going.
Then he [Bhagiratha] prayed to Lord Siva, “Please hold it up in your Jeta (matted locks); otherwise my whole effort is a waste.” He tied his Jeta and kept it [Ganga]. But Siva wouldn’t release it. He simply kept quiet. Then again Bhagiratha prayed to Lord Siva, “Please release it. The purpose is something else.” Then afterwards he [Siva] released it through his hair. Then Ganga came with such force, and it flowed through the Ashrama of a sage called Jahnu. He was so angry he simply took the Ganga and swallowed it. Then Bhagiratha prayed to Jahnu, “Please release it.” Then he released it through the ear. Because it [Ganga] came out of the ear of Jahnu Rishi, she is called Jahnavi. Then it flowed, and it flowed through the ashes of the ancestors and then they were liberated. This happened, they say, today [Ganga Dasara]. This is the whole story. The entire episode is described in great detail in Valmiki Ramayan, in the Bala Kandam – worth reading.
Several chapters, Valmiki devotes to narrate this wonderful history of Ganga coming here. She flowed through three regions. First from heaven; from heaven she came to the astral region; and from the astral region to earth she came. And she is called by different names. In one place it’s Mandakini; in another it’s Bhagirathi; a third is Jahnavi. So, this is the birth of Ganga on this earth.
Alakananda comes from Badrinath, and Ganga is called Bhagirathi. The name ‘Ganga’ came afterwards. Bhagirathi flows from Gomukh, and this Bhagirathi and Alakananda join together in Devprayag. Then she is called Ganga. And then she flows. In Allahabad she joins Yamuna also. And there is a third river called Sarasvati, which is flowing underneath, they say – under the earth, and you cannot see her. Then Ganga becomes very mighty and devastates everything.