According to this legend, Harishchandra gave away his kingdom, sold his family, and agreed to be a slave – all to fulfill a promise he had made to the sage Vishvamitra.
The king postponed the sacrifice multiple times citing various reasons, but finally agreed to it when Rohita became an adult.
The Markandeya Purana contains a detailed legend about his life, narrated by wise birds to the sage Jaimini.
[5][6] The Bhagavata Purana mentions him as the father of Sagara and grandfather of Badaka, and contains a legend about his descendants.
[7] The Markandeya Purana legend is as follows:[5] King Harishchandra lived in the Treta Yuga.
Nearly a month after leaving his kingdom, Harishchandra arrived in the holy city of Kashi, only to see Vishvamitra already present there.
As his hungry son cried for food, Harishchandra worried how would he be able to make a donation to the sage.
An outcaste chandala (actually Yama in disguise) offered to buy him, but Harishchandra's self-respect as a high-caste Kshatriya would not allow this.
Thinking of his misfortune, Harishchandra contemplated suicide, but realized that he would continue to pay for his sins in his next life.
After his ascension to heaven, Vashistha – the sage of Harishchandra's royal dynasty – ended his tapasya of twelve years.
It starts with Vashistha – the sage of Harishchandra's royal dynasty – praising the king's honesty and noble character.
He promises to prove that Harishchandra is not of noble character, and tricks the king into breaking his tapasya.
The rest of the story is similar to the Markandeya Purana version, with minor variations.
[8] In Mahabharata, Narada tells Yudhishthira that Harishchandra is a rajarshi (king-sage), and the only earthly king who finds a place in the assembly of gods.
After completing the rituals, he gratified the Brahmins with delicacies, gave them what they wanted and gifted them jewels.
The earliest is Raja Harishchandra from 1913, written and directed by Dhundiraj Govind Phalke; it is the first full-length Indian feature film.
[10] The first "talkie" of Marathi cinema, Ayodhyecha Raja (1932) directed by V. Shantaram, was also based on his life, starring Govindrao Tembe and Durga Khote as the lead roles.
The film was later remade under the name Ayodhya Ka Raja (1932) in Hindi, making it the first double-language talkie of Indian cinema.
[11] Telugu cinema has produced few films on this hindu mythological subject, in 1935 with the title of Harishchandra was directed by P. Pullaiah starred by Addanki Srirama Murthy and P. Kannamba, in 1960 again with the same title of Harishchandra film was directed by Jampana Chandrashekara Rao and starred by S. V. Ranga Rao and C. Lakshmi Rajyam.
The famously acclaimed Satya Harishchandra (1965 Telugu film) produced and directed by K. V. Reddy under the Vijaya Productions banner.
In Tamil K. B. Nagabhushanam directed Harischandra (1944 film) starred by P. U. Chinnappa and P. Kannamba, in the later years it was remade again in Tamil with the title of Harichandra (1968 film) directed by K. S. Prakash Rao starred by Sivaji Ganesan and G. Varalakshmi which was a popularly acclaimed movie for acting and dialogues.
Also, in Tamil popular colloquial usage, Raja Harishchandra is synonymous with absolute adherence to the truth.
A person is often chided as being "a Raja Harishchandra", if he tries to cling to truth even to the detriment of those related to him.