Sunan Ibn Majah, Volume 2, Book 6, Hadith 1567 (DarusSalam) ⓘ
It was narrated from ‘Uqbah bin ‘Amir that the Messenger of Allah said: ‘If I were to walk on a live coal or a sword, or if I were to sew shows to my feet, that would be better for me than walking on the grave of a Muslim. And I see no difference between relieving myself in the midst of graves or in the middle of the marketplace.”
حَدَّثَنَا مُحَمَّدُ بْنُ إِسْمَاعِيلَ بْنِ سَمُرَةَ، حَدَّثَنَا الْمُحَارِبِيُّ، عَنِ اللَّيْثِ بْنِ سَعْدٍ، عَنْ يَزِيدَ بْنِ أَبِي حَبِيبٍ، عَنْ أَبِي الْخَيْرِ، مَرْثَدِ بْنِ عَبْدِ اللَّهِ الْيَزَنِيِّ عَنْ عُقْبَةَ بْنِ عَامِرٍ، قَالَ قَالَ رَسُولُ اللَّهِ ـ صلى الله عليه وسلم ـ " لأَنْ أَمْشِيَ عَلَى جَمْرَةٍ أَوْ سَيْفٍ أَوْ أَخْصِفَ نَعْلِي بِرِجْلِي أَحَبُّ إِلَىَّ مِنْ أَنْ أَمْشِيَ عَلَى قَبْرِ مُسْلِمٍ وَمَا أُبَالِي أَوَسَطَ الْقُبُورِ قَضَيْتُ حَاجَتِي أَوْ وَسَطَ السُّوقِ " .
also referenced under: Hadith 1567 (Reference) & Book 6, Hadith 1634 (In-Book)