antakaale cha maameva smaranmuktvaa kalevaram |
yaha prayaati sa madbhaavam yaati naastyatra samshayaha || 5 ||

One who, even during the time of departure, abandons his body while remembering me, he achieves my true nature, in this matter there is no doubt.
antakaale : during the time of departure
cha : and
maam : me
eva : even
smaran : remembering
muktvaa : abandons
kalevaram : body
yaha : one who
prayaati : goes
saha : he
madbhaavam : my nature
yaati : achieves
na : no
asti : is
atra : in this matter
samshayaha : doubt
The remainder of this chapter is the answer to the fundamental questions raised by Arjuna : “How does one attain Ishvara at the time of death?” Having addressed all the other questions, Shri Krishna begins to answer that most important question in this shloka. He says that only the one who remembers Ishvara at the time of death will attain Ishvara.
We now have a definite “action item” from Shri Krishna. He asserts that our final goal in life should be this: to remember Ishvara at the time of death. Shri Krishna assures it is so, because he says “in this matter there is no doubt”. It is clearly spelled out for us.
At first glance, it may seem straightforward. All we have to do is to remember Ishvara at the time of death. But it is not so. In most cases, we may not know when we die. We could die in an accident. We could have lost our mental faculties. Our attachment towards our family will occupy our minds. There are so many factors that will prevent us from remembering Ishvara only at the time of death.
So then, how do we get around this problem? Shri Krishna addresses it shortly. First, he explains why our thought at the time of death is so important.