Sunan an-Nasa'i, Volume 4, Book 25, Hadith 3139 (DarusSalam)

It was narrated from Abu Hurairah, that one of the people of Ash-Sham said to him: "O Shaikh, tell me of a Hadith that you heard from the Messenger of Allah." (He said: "Yes; I heard the Messenger of Allah) say: 'The first of people for whom judgment will be passed on the Day of Resurrection are three. A man who was martyred. He will be brought and Allah will remind him of His blessings and he will acknowledge them. He will say: What did you do with them? He will say: I fought for Your sake until I was martyred. He will say: You are lying. You fought so that it would be said that so-and-so is brave, and it was said. Then He will order that he be dragged on his face and thrown into the Fire. And (the second will be) a man who acquired knowledge and taught others,and read Qur'an. He will be brought, and Allah will remind him of His blessings, and he will acknowledge them. He will say: What did you do with them? He will say: I acquired knowledge and taught others, and read the Qur'an for Your sake. He will say: You are lying. You acquired knowledge so that it would be said that you were a scholar; and you read Qur'an so that it would be said that you were a reciter, and it was said. Then He will order that he be dragged on his face and thrown into the Fire. And (the third will be) a man whom Allah made rich and gave him all kinds of wealth. He will be brought and Allah will remind him of His blessings, and he will acknowledge them. he will say: What did you do with them? He will say: I did not leave any way that You like wealth to be spent - Abu 'Abdur-Rahman (An-Nasa'i) said: I did not understand "what You like" as I wanted to [1] - "but I spent it." He will say: "You are lying. You spent it so that it would be said that he was generous, and it was said." Then he will order that he be dragged on his face and thrown into the Fire.'" [1] That is, he did not hear or understand what came after it as well as he wanted to, but it was similar to what follows regarding the spending. Similar was stated by Shaikh 'Abdur-Rahman Al-punjani in his notes on the text, according to Al-Funjani in his commentary At-Ta'iqat As-Salafiyyah (2:51)

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

sunnah.com