Is it wrong to pray for early death?

It is wrong to pray for early death. This life is a period when a person can increase his reward. How can one tell that his early death will ensure going to heaven? Let me tell you this Hadith which explains the Islamic attitude.

Two of the companions of the Prophet, peace be upon him, were close friends. One of them died a martyr in one of the battles he fought under the Prophet’s command. The other lived for a year after his friend.

A third friend saw them both in a dream comfortably settled in heaven, but the one who died later was in a better position than his friend, the martyr was. Puzzled, this friend went to the Prophet, peace be upon him, and related his dream to him, then he asked: “How can the non-martyr be ahead of the martyr in heaven?” The Prophet’s reply is very significant. He said: “Had he not prayed 6,000 rak’ahs more and fasted the month of Ramadhan?” What he meant was that in the extra year he lived, the second man offered his five obligatory prayers every day, which make up 6018 rak’ahs in a lunar year.

This is not counting any Sunnah or Witr he also offered. He also fasted an extra month of Ramadhan. The reward of his deeds in this extra year lifted him above his martyr friend in heaven. If the case is such, why should anyone pray for early death? If his life is difficult, persevering earns him a great reward.