All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah and that Muhammad is His slave and Messenger.
Giving the choice to the Prophet before taking his soul (death) is something confirmed from many sources. For instance, ‘Aa’ishah said:
“The Prophet used to say while he was in good health, 'No prophet's soul is ever taken away unless he is shown his place in Paradise and given the choice (to die or to survive).' When the death of the Prophet approached and his head was on my thigh, he became unconscious for a while and then he came to his senses and fixed his eyes on the ceiling and said, 'O Allaah! (with) the Highest Companion.' I said, 'Hence he is not going to choose us.' And I came to know that it was the hadeeth that he used to narrate to us while he was in good health. That was the last statement of the Prophet (before his death), 'O Allaah! With the Highest Companion.'” [Al-Bukhari and Muslim]
Also, Abu Sa'eed al-Khudri narrated that the Prophet sat on the pulpit and said, “A slave of Allaah had been given the choice between the pleasures of this worldly life and that which is with Allaah, and he has chosen that which is with Allaah.” Thereupon Abu Bakr wept and said, “Let our fathers and our mothers be taken as ransom for you.” So we were astonished; and the people said, “Look at this Shaykh (old man), the Prophet informs us about a slave who was given the choice by Allaah to choose between the pleasures of this world or that which is with Allaah, and he [Abu Bakr] says, 'Let our fathers and our mothers be taken as ransom for you.'” The Prophet was the slave who was given the choice, and Abu Bakr was the most knowledgeable of it among us. [Al-Bukhari and Muslim]
Also, Imaam Ahmad reported in his Musnad that the Prophet said, “O Abu Muwayhibah! I have been given the keys to the treasures of this worldly life and to lasting life in it followed by Paradise; I was given a choice between this and the meeting with my Lord and Paradise.” Abu Muwayhibah said, “Let my father and mother be a ransom for you, O Prophet of Allaah! Take the keys of the treasures of this worldly life and lasting life in it and then Paradise.” The Prophet said, “No, by Allaah, O Abu Muwayhibah; I have chosen the meeting with my Lord and Paradise.” Then he sought forgiveness for the people buried in Al-Baqee’ graveyard and left. The following morning, he became ill with his fatal sickness.
Al-Arnaa’oot classified this hadeeth as saheeh (sound).
Allaah knows best.