In almost all of the scriptures, it is stated and emphasized that one should remember the Holy Name of God always and, most especially, at the time of death. The thought of God, His divine attributes, or His transcendental Name, if remembered or uttered at the time of death, will undoubtedly enable a soul to reach the abode of God. "He who departs from the body thinking of Me, attains My state; there is no doubt about it." And again, "Arjuna, whatever one thinks at the time of death, that and that alone he attains, being ever absorbed in its thought."
A man who remembers God at the time of death must have been a devotee of God throughout his life; otherwise, the remembrance of God and His divine Name would never have come to him. In some cases, due to some good karma, one remembers the Name of God incidentally and reaches the supreme abode. In the Bhagavatam, the story of a sinful man named Ajamila is narrated. He was a good man of noble deeds up to his middle age; then he fell from the path and committed many sins. He had deep attachment for an untouchable woman and her children born of him.
When death knocked at the gate, he was so afraid and pained by the thought of separation from his objects of attachment, that he cried the name of his last child, which incidentally was the Name of God, Narayana. Even though it was an unintentional utterance of the Name Divine without any thought of God, Sage Vyasa writes in the Bhagavatam that being uttered at the time of death, it had the power to drive out the messengers of death, and Ajamila was taken to the abode of God. As we said earlier, however, it was the good karma performed up to his middle age which came to his protection at the time of death. This is a good illustration to prove the efficacy of the Name Divine and inspire devotion in sinful hearts.
In the story of Ajamila, Yama, the god of death, says to his messengers that they have no jurisdiction to go to a place where the kirtan (divine song) of the Lord is being sung, nor to touch the soul of man being sanctified by repetition of a Holy Name. Millions of devotees in Hinduism and all the other world religions practice the simple method of repeating the Holy Name every day so that they might have the thought of God at the time of death.
In connection with the other utterances, "Whatever one thinks at the time of death, that alone he attains," some points should be made clear. Suppose a man remembers someone whom he loved or some object for which he had attachment. Does this mean that he will attain that object or be born like it? No. For instance, there are people who, due to their attachment to smoking, manifest through their gestures at the time of death that they want to smoke. In such cases, the man might be reborn as a worker in a cigarette factory or on a tobacco estate or as a servant surrounded by such an atmosphere. In other words, his aspirations in his reincarnation will be according to his prenatal habits, the foremost of which comes as the last thought at the time of death.
The attachments of an individual during his lifetime take six forms: lust, anger, greed, jealousy, infatuation and arrogance. Any one of these could develop into a very strong tendency in an individual, and it is that and that alone which he carries with him into his next birth as a predominant tendency. All his other faculties will also follow him, but the strong impressions of the past pull him in their direction to do good or bad works in his next birth.
This law of the last thought being infallible, all saints and sages admonish everyone to develop divine qualities by sublimating, purifying, or totally uprooting these six enemies mentioned above. Lord Krishna says in the Gita, "Having restrained all the senses of perception, fixing the mind in the heart, fixing the life breath in the head, and remaining steadfast in yogic concentration on God, he who leaves the body and departs reciting the one-syllabled word, AUM, and dwells on Me in My absolute aspect, attains the supreme state."
Another illustration is that of King Parikshita, who questioned Sage Suka, "Oh revered guru, what is the foremost duty of a man who is at the threshold of death?"
Sage Suka said, "Either through wisdom, devotion, or the path of Dharma, one's whole life should be so planned that at the time of death the remembrance of God should occupy one's mind. This is the greatest benefit to this human life."
(Essence of Bhagavad Gita and Bible, p. 67.)