Abdullah bin Abbas reported,

Ibn Abbas saw Abdullah bin Harith praying with his hair tied in a knot behind his head, so he stood up and began to undo it. When Abdullah finished his prayer, he turned to Ibn Abbas and asked, "What concern do you have with my hair?"Ibn Abbas replied, "I heard the Messenger of Allah ﷺ say, 'The likeness of one who prays in this state is like that of someone praying with his hands tied behind his back.'"

Azami 2615

Sahih

عن ابن عباس

أنه رأى عبد الله بن الحارث يصلي ورأسه معقوص من ورائه. فقام فجعل يحله. فلما انصرف أقبل إلى ابن عباس. فقال: مالك ورأسي؟ فقال: إني سمعت رسول الله ﷺ يقول: إنما مثل هذا مثل الذي يصلي وهو مكتوف.

الأعظمي 2615صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Prayer
Chapter
What is prohibited and disliked in prayer
Section
Prohibition of a man praying with his hair tied up
Numbering
Jami al-Kamil 2615 (2nd edition)
Azami 2615