Janaka had invited Dasrath, the father of Rama and king of Ayodhya for the marriage ceremony. He also proposed to marry his daughter Urmilla to Lakshmana and his two nieces to Bharata and Shatrughana. All this was done with great pomp and show. The sage Yajnavalkya was the priest of Janaka and also his adviser. Through his pure and righteous life Janaka is said to have attained Unity with Lord-God. Though he was a Kshatriya, he became the preceptor of the great Brahmin sage Suka (Sukhdev) the son of Vyasa, because of his great spiritual attainments.
It is said that he asserted his right of performing sacrifices without the intervention of priests (Brahmins). When he left this world and was going towards the Abode of the Lord, he heard in the way the cries and wailings of many jivas. They were, in fact, the sinners who were undergoing the punishment in hell. He interceded on their behalf and got them rescued from the fire of hell. The Dharmaraja let them off after receiving the Command of Lord-God, who is ever kind towards His devotees. See : Rama and Sita
1. Kohli, Surindar Singh (ed), Dictionary of Mythological References in Guru Granth Sahib, 1993