English : Vol. 1, Book 6, Hadith 1567
Grading supplied with this record: Da'if (Darussalam)
Narration text is preserved in its supplied Arabic and English. Translated interfaces and reading guides do not add narration translations in other languages.
لأَنْ أَمْشِيَ عَلَى جَمْرَةٍ أَوْ سَيْفٍ أَوْ أَخْصِفَ نَعْلِي بِرِجْلِي أَحَبُّ إِلَىَّ مِنْ أَنْ أَمْشِيَ عَلَى قَبْرِ مُسْلِمٍ وَمَا أُبَالِي أَوَسَطَ الْقُبُورِ قَضَيْتُ حَاجَتِي أَوْ وَسَطَ السُّوقِ "
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."
Full reference and source
English : Vol. 1, Book 6, Hadith 1567 Arabic : Book 6, Hadith 1634
View source on Sunnah.com (opens in a new tab)