It is narrated from Sayyiduna Abu Hurayrah (may Allah be pleased with him) that the Prophet (peace and blessings be upon him) said: "When one of you treads on filth with his shoes, the soil will purify them."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 4246
Sayyiduna Abu Hurayrah (may Allah be pleased with him) said that the Prophet (peace and blessings be upon him) said: "When you tread on filth with your shoes, the soil will purify it."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 4247
Sayyiduna Abu Sa'id al-Khudri (may Allah be pleased with him) said: The Prophet (peace and blessings be upon him) was leading the Companions (may Allah be pleased with them) in prayer when he (peace and blessings be upon him) suddenly took off his shoes and placed them on his left side. When the Companions (may Allah be pleased with them) saw this, they too took off their shoes. When he (peace and blessings be upon him) finished the prayer, he asked: "Why did you take off your shoes?" They said: "We saw you (peace and blessings be upon him) take off your shoes, so we took ours off too." He (peace and blessings be upon him) said: "Jibril (peace be upon him) told me that there was filth on them." Then he (peace and blessings be upon him) said: "When you come to the prayer, look at your shoes; if there is filth on them, wipe it off and pray in them."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 4249
It is narrated from Abu Na'amah (may Allah have mercy on him) with the same chain and meaning, and in it the Prophet (peace and blessings be upon him) said: "When one of you comes to the mosque, let him look at his shoes; if there is filth on them, let him remove it and pray in them."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 4250