Sayyiduna Abu Hurairah (may Allah be pleased with him) reports that the Messenger of Allah (peace and blessings be upon him) said: "When any one of you is praying, if he removes his shoes, he should not cause harm to anyone with them, rather he should place them between his own feet."
Hadith Referenceمعجم صغير للطبراني / كتاب الصلوٰة / 280
Hadith Gradingمحدثین:حسن صحيح
Hadith Takhrij«حسن صحيح ، أخرجه ابن خزيمة فى «صحيحه» برقم: 1009، 1016، وابن حبان فى «صحيحه» برقم: 2182، 2183، 2187، 2188، والحاكم فى «مستدركه» برقم: 958، 960، 963، وأبو داود فى «سننه» برقم: 654، 655، وابن ماجه فى «سننه» برقم: 1432، والبيهقي فى«سننه الكبير» برقم: 4327، 4328، والبزار فى «مسنده» برقم: 8432، وعبد الرزاق فى «مصنفه» برقم: 1519، وابن أبى شيبة فى «مصنفه» برقم: 7980، 7983، والطبراني فى «الصغير» برقم: 783 قال الشيخ الألباني: حسن صحيح»
Abu Hurairah reported the Messenger of Allah ﷺ as saying: when any of you prays and takes off his sandals, he should not harm anyone by them. He should place them between his feet or pray with them on
Shaykh Umar Farooq Saeedi
655. Commentary: ➊ It is permissible to pray both after removing the shoes or while wearing them. However, occasionally praying with shoes on, with the intention of reviving the Sunnah and expressing opposition to the Jews, is a cause of reward and virtue. Nevertheless, care should be taken that this action does not become a cause of discord among the uninformed masses. ➋ It is forbidden (haram) to cause harm to any Muslim in any way.
Source: Sunan Abu Dawood – Commentary by Shaykh Umar Farooq Saeedi, Page: 655