Sunan Abi Dawud, Hadith 4683 ⓘ
Ubadah b. al Samit said to his son : Son! You will not get the taste of the reality of faith until you know that what has come to you could not miss you, and that what has missed you could not come to you. I heard the Messenger of Allah say: The first thing Allah created was the pen. He said to it: Write. It asked: What should I write, my Lord? He said: Write what was decreed about everything till the Last Hour comes. Son! I heard the Messenger of Allah say : He who dies on something other than this does not belong to me.
حَدَّثَنَا جَعْفَرُ بْنُ مُسَافِرٍ الْهُذَلِيُّ، حَدَّثَنَا يَحْيَى بْنُ حَسَّانَ، حَدَّثَنَا الْوَلِيدُ بْنُ رَبَاحٍ، عَنْ إِبْرَاهِيمَ بْنِ أَبِي عَبْلَةَ، عَنْ أَبِي حَفْصَةَ، قَالَ قَالَ عُبَادَةُ بْنُ الصَّامِتِ لاِبْنِهِ يَا بُنَىَّ إِنَّكَ لَنْ تَجِدَ طَعْمَ حَقِيقَةِ الإِيمَانِ حَتَّى تَعْلَمَ أَنَّ مَا أَصَابَكَ لَمْ يَكُنْ لِيُخْطِئَكَ وَمَا أَخْطَأَكَ لَمْ يَكُنْ لِيُصِيبَكَ سَمِعْتُ رَسُولَ اللَّهِ صلى الله عليه وسلم يَقُولُ " إِنَّ أَوَّلَ مَا خَلَقَ اللَّهُ الْقَلَمَ فَقَالَ لَهُ اكْتُبْ . قَالَ رَبِّ وَمَاذَا أَكْتُبُ قَالَ اكْتُبْ مَقَادِيرَ كُلِّ شَىْءٍ حَتَّى تَقُومَ السَّاعَةُ " . يَا بُنَىَّ إِنِّي سَمِعْتُ رَسُولَ اللَّهِ صلى الله عليه وسلم يَقُولُ " مَنْ مَاتَ عَلَى غَيْرِ هَذَا فَلَيْسَ مِنِّي " .
also referenced under: Hadith 4700 (DarusSalam)