This part is taken from Yoga Vasishtam in “Spiritual Stories” as Told by Ramana Maharshi

In Vasishtam,there is a story about Bhagiratha, before he brought the Ganges down to the earth. He was an emperor but the empire seemed to him a great burden because of Atmajignasa (Self-enquiry). In accordance with the advice of his guru and on the pretext of a Yagna (sacrifice), he gave away all his wealth and other possessions. No one would, however take the empire. So he invited the neighbouring king who was an enemy and who was waiting for a suitable opportunity and gifted away the empire to him. The only thing that remained to be done was leaving the country. He left at midnight in disguise, lay in hiding during day time in other countries so as not to be recognised and went about begging at night.

Ultimately he felt confident that his mind had matured sufficiently to be free from egoism. Then he decided to go to his native place and there went out begging in all the streets. As he was not recognised by anyone, he went one day to the palace itself. The watchman recognised him, made obeisance and informed the king about it, shivering with fear. The king came in a great hurry and requested him (Bhagiratha) to accept the kingdom back, but Bhagiratha did not agree. “Will you give me alms or not?”, he asked. As there was no other alternative, they gave him alms and he went away highly pleased.

Subsequently he became the king of some other country for some reason and when the king of his own country passed away, he ruled that country also at the special request of the people. That story is given in detail in Vasishtam. The kingdom which earlier appeared to him to be a burden did not trouble him in the least after he attained jnana.