Sunan Ibn Majah, Book 6, Hadith 1591 (In-Book)

It was narrated that Jabir said: “The leader of the hypocrites in Al- Madinah died, and left instructions that the Prophet should offer the funeral prayer for him and shroud him in his shirt. He offered the funeral prayer for him and shrouded him in his shirt, and stood by his grave. Then Allah revealed the words: ‘And never pray (the funeral prayer) for any of them (hypocrites) who dies, nor stand at his grave.” [9:84]

حَدَّثَنَا عَمَّارُ بْنُ خَالِدٍ الْوَاسِطِيُّ، وَسَهْلُ بْنُ أَبِي سَهْلٍ، قَالاَ حَدَّثَنَا يَحْيَى بْنُ سَعِيدٍ، عَنْ مُجَالِدٍ، عَنْ عَامِرٍ، عَنْ جَابِرٍ، قَالَ مَاتَ رَأْسُ الْمُنَافِقِينَ بِالْمَدِينَةِ وَأَوْصَى أَنْ يُصَلِّيَ عَلَيْهِ النَّبِيُّ ـ صلى الله عليه وسلم ـ وَأَنْ يُكَفِّنَهُ فِي قَمِيصِهِ فَصَلَّى عَلَيْهِ وَكَفَّنَهُ فِي قَمِيصِهِ وَقَامَ عَلَى قَبْرِهِ فَأَنْزَلَ اللَّهُ ‏{وَلاَ تُصَلِّ عَلَى أَحَدٍ مِنْهُمْ مَاتَ أَبَدًا وَلاَ تَقُمْ عَلَى قَبْرِهِ}‏ ‏.‏

sunnah.com