Sunan Abi Dawud, Hadith 4686

Narrated Umar ibn al-Khattab: Muslim ibn Yasar al-Juhani said: When Umar ibn al-Khattab was asked about the verse "When your Lord took their offspring from the backs of the children of Adam" - al-Qa'nabi recited the verse--he said: I heard the Messenger of Allah say when he was questioned about it: Allah created Adam, then passed His right hand over his back, and brought forth from it his offspring, saying: I have these for Paradise and these will do the deeds of those who go to Paradise. He then passed His hand over his back and brought forth from it his offspring, saying: I have created these for Hell, and they will do the deeds of those who go to Hell. A man asked: What is the good of doing anything, Messenger of Allah? The Messenger of Allah said: When Allah creates a servant for Paradise, He employs him in doing the deeds of those who will go to Paradise, so that his final action before death is one of the deeds of those who go to Paradise, for which He will bring him into Paradise. But when He creates a servant for Hell, He employs him in doing the deeds of those who will go to Hell, so that his final action before death is one of the deeds of those who go to Hell, for which He will bring him into Hell.

حَدَّثَنَا عَبْدُ اللَّهِ الْقَعْنَبِيُّ، عَنْ مَالِكٍ، عَنْ زَيْدِ بْنِ أَبِي أُنَيْسَةَ، أَنَّ عَبْدَ الْحَمِيدِ بْنَ عَبْدِ الرَّحْمَنِ بْنِ زَيْدِ بْنِ الْخَطَّابِ، أَخْبَرَهُ عَنْ مُسْلِمِ بْنِ يَسَارٍ الْجُهَنِيِّ، أَنَّ عُمَرَ بْنَ الْخَطَّابِ، سُئِلَ عَنْ هَذِهِ الآيَةِ، ‏{‏ وَإِذْ أَخَذَ رَبُّكَ مِنْ بَنِي آدَمَ مِنْ ظُهُورِهِمْ ‏}‏ قَالَ قَرَأَ الْقَعْنَبِيُّ الآيَةَ ‏.‏ فَقَالَ عُمَرُ سَمِعْتُ رَسُولَ اللَّهِ صلى الله عليه وسلم سُئِلَ عَنْهَا فَقَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم ‏"‏ إِنَّ اللَّهَ عَزَّ وَجَلَّ خَلَقَ آدَمَ ثُمَّ مَسَحَ ظَهْرَهُ بِيَمِينِهِ فَاسْتَخْرَجَ مِنْهُ ذُرِّيَّةً فَقَالَ خَلَقْتُ هَؤُلاَءِ لِلْجَنَّةِ وَبِعَمَلِ أَهْلِ الْجَنَّةِ يَعْمَلُونَ ثُمَّ مَسَحَ ظَهْرَهُ فَاسْتَخْرَجَ مِنْهُ ذُرِّيَّةً فَقَالَ خَلَقْتُ هَؤُلاَءِ لِلنَّارِ وَبِعَمَلِ أَهْلِ النَّارِ يَعْمَلُونَ ‏"‏ ‏.‏ فَقَالَ رَجُلٌ يَا رَسُولَ اللَّهِ فَفِيمَ الْعَمَلُ فَقَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم ‏"‏ إِنَّ اللَّهَ عَزَّ وَجَلَّ إِذَا خَلَقَ الْعَبْدَ لِلْجَنَّةِ اسْتَعْمَلَهُ بِعَمَلِ أَهْلِ الْجَنَّةِ حَتَّى يَمُوتَ عَلَى عَمَلٍ مِنْ أَعْمَالِ أَهْلِ الْجَنَّةِ فَيُدْخِلَهُ بِهِ الْجَنَّةَ وَإِذَا خَلَقَ الْعَبْدَ لِلنَّارِ اسْتَعْمَلَهُ بِعَمَلِ أَهْلِ النَّارِ حَتَّى يَمُوتَ عَلَى عَمَلٍ مِنْ أَعْمَالِ أَهْلِ النَّارِ فَيُدْخِلَهُ بِهِ النَّارَ ‏"‏ ‏.‏

sunnah.com