Chitragupta is mentioned in Garuda Purana and many other mythology. Lord Chitragupta is considered the god of justice because they keep an account of the deeds of all human beings and they take care of this so that after death, there is correct justice with the soul and its further journey is according to his deeds. It is said that when the creation was created, Lord Brahma composed all the creatures but the death of those creatures was also certain. Therefore, it was necessary that the deeds of the organism should be kept in account, so that his journey or his punishment could be fixed on that basis. Hence Chitragupta was appointed for this work.
According to mythological beliefs, Lord Brahma did penance for 12,000 years with his yoga power. As a result of this meditation, a divine creature appeared from his body, which was Chitragupta. Due to being born from the body of Lord Brahma, Lord Chitragupta is called Kayastha or his descendants. The function of Chitragupta is to record secret and manifest deeds of each organism. Chitragupta keeps an account of good and bad deeds of every living being. When the creature reaches Yamlok after death, Chitragupta’s account is presented to Yamraj. On this basis, Yamraj decides to send the soul to heaven, hell or rebirth. Chitragupta is considered a symbol of fair and infallible justice. They take account of deeds impartially. They decide on the basis of the principle of karma, which teaches that you will definitely get the result of your every karma.
Yamraj is the god of death as well as the god of punishment and justice, who gives his decision on the basis of deeds. In this work, Chitragupta plays the role of a accountant or lawyer. Brahma entrusted the responsibility to Yamraj, the god of death, to judge the creatures according to their deeds. But this work was difficult for Yamraj alone, because it was a difficult task to keep an account of the deeds of the innumerable creatures of the universe. Therefore, Brahma entrusted Chitragupta the responsibility of helping Yamraj in keeping an account of the deeds of every creature from birth to death. The work of Yamraj and Chitragupta is incomplete without each other. The pair plays an important role in maintaining the rules of karma and religion in the universe. In Hinduism, Chitragupta is worshiped mainly on Chitragupta Jayanti (on the second day of Diwali). People of Kayastha society especially worship him. It is believed that by worshiping Lord Chitragupta, a person does not have to suffer the sufferings of hell.