How did the Messenger of Allah ﷺ wash his head while in the state of ihram?Abu Ayub placed his hand on the cloth and lowered it until his head appeared, then he said to a man, "Pour water over my head." He then moved his hands through his hair, bringing them forward and backward, and said, "This is how I saw the Messenger of Allah ﷺ do it."
أخبرنا قتيبة بن سعيد عن مالك عن زيد بن أسلم عن إبراهيم بن عبد الله بن حنين عن أبيه عن عبد الله بن عباس والمسور بن مخرمة أنهما اختلفا بالأبواء فقال ابن عباس يغسل المحرم رأسه وقال المسور لا يغسل رأسه فأرسلني ابن عباس إلى أبي أيوب الأنصاري أسأله عن ذلك فوجدته يغتسل بين قرني البئر وهو مستتر بثوب فسلمت عليه وقلت أرسلني إليك
كيف كان رسول الله ﷺ يغسل رأسه وهو محرم فوضع أبو أيوب يده على الثوب فطأطأه حتى بدا رأسه ثم قال لإنسان يصب على رأسه ثم حرك رأسه بيديه فأقبل بهما وأدبر وقال هكذا رأيت رسول الله ﷺ يفعل
Recorded by Muslim, Hajj, chapter on the permissibility of a Muhrim washing his body and head, hadith no. 1205, from Qutayba, and by Bukhari, Recompense for Game, chapter on bathing for one in ihram, hadith no. 1840, from the hadith of Malik with the same wording. It is also found in the Muwatta (Yahya's recension), 1/323, and in the Kubra, hadith no. 3645.