Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
ibnmajah:1569Abū Bakr b. Abū Shaybah > Muḥammad b. ʿUbayd > Yazīd b. Kaysān > Abū Ḥāzim > Abū Hurayrah

“Visit the graves, for they will remind you of the Hereafter.”  

ابن ماجة:١٥٦٩حَدَّثَنَا أَبُو بَكْرِ بْنُ أَبِي شَيْبَةَ حَدَّثَنَا مُحَمَّدُ بْنُ عُبَيْدٍ عَنْ يَزِيدَ بْنِ كَيْسَانَ عَنْ أَبِي حَازِمٍ عَنْ أَبِي هُرَيْرَةَ قَالَ

قَالَ رَسُولُ اللَّهِ ﷺ زُورُوا الْقُبُورَ فَإِنَّهَا تُذَكِّرُكُمُ الآخِرَةَ  


See similar narrations below:

Collected by Ḥākim, Suyūṭī
hakim:1388Abū Bakr Muḥammad b. ʿAbdullāh b. ʿUmar al-Bazzār> Muḥammad b. Shādhān al-Jawharī > Zakariyyā b. ʿAdī > Sallām b. Sulaym > Yaḥyá b. al-Jābir > ʿAmr b. ʿĀmir > Anas b. Mālik

The Messenger of Allah ﷺ as saying: I forbade you to visit graves, but you may now visit them, for in visiting them there is a reminder (of death). (Using translation from Abū Dāʾūd 3235)   

الحاكم:١٣٨٨حَدَّثَنَا أَبُو بَكْرٍ مُحَمَّدُ بْنُ عَبْدِ اللَّهِ بْنِ عُمَرَ الْبَزَّارُ بِبَغْدَادَ ثنا مُحَمَّدُ بْنُ شَاذَانَ الْجَوْهَرِيُّ ثنا زَكَرِيَّا بْنُ عَدِيٍّ ثنا سَلَّامُ بْنُ سُلَيْمٍ عَنْ يَحْيَى بْنِ الْجَابِرِ عَنْ عَمْرِو بْنِ عَامِرٍ عَنْ أَنَسِ بْنِ مَالِكٍ قَالَ

قَالَ رَسُولُ اللَّهِ ﷺ «نَهَيْتُكُمْ عَنْ زِيَارَةِ الْقُبُورِ فَزُورُوهَا فَإِنَّهَا تُذَكِّرُكُمُ الْمَوْتُ»