(8) The Book of the Masjids
كتاب المساجد
(13) Chapter: The Prohibition Of Taking Graves As Masjids
(13) باب النِّهْىِ عَنِ اتِّخَاذِ الْقُبُورِ، مَسَاجِدَ
Sunan an-Nasa'i 704 
It was narrated from 'Aishah that Umm Habibah and Umm Salamah mentioned a church that they had seen in Ethiopia, in which there were images. The Messenger of Allah (ﷺ) said:
"Those people, if there was a righteous man among them, when he died they built a place of worship over his grave and made those images. They will be the most evil of creation before Allah on the Day of Resurrection."
أَخْبَرَنَا يَعْقُوبُ بْنُ إِبْرَاهِيمَ، قَالَ حَدَّثَنَا يَحْيَى، قَالَ حَدَّثَنَا هِشَامُ بْنُ عُرْوَةَ، قَالَ حَدَّثَنِي أَبِي، عَنْ عَائِشَةَ، أَنَّ أُمَّ حَبِيبَةَ، وَأُمَّ سَلَمَةَ ذَكَرَتَا كَنِيسَةً رَأَتَاهَا بِالْحَبَشَةِ فِيهَا تَصَاوِيرُ فَقَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم ‏ "‏ إِنَّ أُولَئِكَ إِذَا كَانَ فِيهِمُ الرَّجُلُ الصَّالِحُ فَمَاتَ بَنَوْا عَلَى قَبْرِهِ مَسْجِدًا وَصَوَّرُوا تِيكَ الصُّوَرَ أُولَئِكَ شِرَارُ الْخَلْقِ عِنْدَ اللَّهِ يَوْمَ الْقِيَامَةِ ‏"‏ ‏.‏
Grade :  Sahih (Darussalam)
Reference : Sunan an-Nasa'i 704
In-book reference : Book 8, Hadith 17
English translation : Vol. 1, Book 8, Hadith 705