According to one legend, Indra had asked for Ganga to be given to heaven to calm the Gods with her cool waters. Different legends about River Ganga narrate different stories of her descent to earth. The story of Ganga's descent on Earth appears in slightly different forms in Ramayana, Mahabharata and the Puranas. The most interesting legend about River Ganga revolves around a king: Sagara, his sons, grandson (Ansuman) and the great grandson, Bhagirath.
Once King Sagara performed the Ashwamedha sacrifice (horse ceremony), in which a horse is allowed to roam at will and warriors try to rein in the horse. Stopping the horse amounts to declaration of war and if they fail that means they accept the suzerainty of the King. The sixty thousand sons of King Sagara went about looking for the horse and ended up reaching the deep oceans and the horse was found close to the sage Kapila, who sat in deep meditation. In their attempt to catch the horse the sons disturbed Kapila, who instantly burnt them to ashes with his fiery gaze.
Pleased with the insight and knowledge of Ansuman, the grandson of Sagara, sage Kapila told Anshuman that the waters of Ganga, who was residing in heaven, might release the souls of the sons of Sagara. Finally, it was Dilip's son Bhagiratha, who managed to bring Goddess Ganga on earth. To bear the impact of the severity of the fall of River Ganga, Bhagiratha prayed to Lord Shiva, who agreed for the same. Finally, the river Ganga came down and fell into Shiva's matted hair and thence to earth. Bhagiratha led the way on horseback and the river followed. They finally reached the spot where the ashes of the six thousand sons lay and liberated the souls.