The Prophets (blessings and peace of Allaah be upon them) are dead as far as the people of this world are concerned. Allaah says, addressing the last and best of them (interpretation of the meaning):
“Verily, you (O Muhammad) will die, and verily, they (too) will die”
But before Allaah they are alive, for if the martyrs are alive with Allaah, then the Prophets are undoubtedly higher in status before Allaah. See Fath al-Baari, 6/444.
It was narrated in an authentic report that the Prophet (peace and blessings of Allaah be upon him) said: “The Prophets are alive in their graves and they pray.” (Narrated by al-Bazzaar; classed as authentic by al-Albaani in Saheeh al-Jaami’, 2790). This prayer is something that they are blessed with just as the people of Paradise are blessed with tasbeeh (glorifying Allaah).
They (blessings and peace of Allaah be upon them) are in their graves apart from ‘Eesa (Jesus)(peace be upon him), whom Allaah raised up into heaven, as He says (interpretation of the meaning):
“But they killed him not, nor crucified him, but it appeared so to them [the resemblance of ‘Eesa (Jesus) was put over another man (and they killed that man)], and those who differ therein are full of doubts. They have no (certain) knowledge, they follow nothing but conjecture. For surely; they killed him not [i.e. ‘Eesa (Jesus), son of Maryam (Mary)]:
But Allaah raised him [‘Eesa (Jesus)] up (with his body and soul) unto Himself (and he is in the heavens). And Allaah is Ever All-Powerful, All-Wise.”
With regard to the Prophets praying behind the Prophet (peace and blessings of Allaah be upon him) on the night of the Isra’ (Night Journey), they prayed behind him in spirit, but their bodies were in their graves. The same applies to his seeing the Prophets during the Mi’raaj (ascent into heaven), when he saw Adam in the lowest heaven, and ‘Eesa and Yahya in the second heaven, and Yoosuf in the third, and Idrees in the fourth, and Haroon in the fifth, and Moosa in the sixth, and Ibraaheem in the seventh, or vice versa. He saw their souls appear in the shape of their bodies.
Some people say that he saw the same bodies that are buried in the graves, but this view does not carry any weight.
But ‘Eesa ascended into heaven body and soul, and the same is said of Idrees.
But with regard to Ibraaheem, Moosa and others, they are buried on earth.
The Messiah (may the blessings and peace of Allaah be upon him and all the other Prophets) will inevitably descend to earth, to the white minaret in the east of Damascus; he will kill the Dajjaal (“Antichrist”), break the cross and kill the pigs, as is proven in the saheeh ahaadeeth (authentic reports). Hence he is in the second heaven even though he is superior to Yoosuf, Idrees and Haroon, because he will descend to the earth before the Day of Resurrection, unlike the other Prophets. And Adam is in the lowest heaven because the souls of his descendents who are blessed (i.e., destined for Paradise) will be shown to him. As for the souls of the doomed (i.e., those who are destined for Hell) the gates of heaven will not be opened for them and they will not enter Paradise until the camel passes through the eye of the needle. So if they will be shown to him, he has to be near them. There is no contradiction in the fact that they (may blessings and peace of Allaah be upon them) prayed behind the Prophet (peace and blessings of Allaah be upon him) then he met some of them after he was taken up into the heavens, because the souls are like the angels, they may ascend and descend in an instant; they are not like bodies.
Adapted from Majmoo’ al-Fataawa by Shaykh al-Islam Ibn Taymiyah (may Allaah have mercy on him), 4/328-329.