Question posed to Shaykh Ibn Baaz, rahimahullah:
Q. Are the deeds of a child who has not yet reached the age of puberty such as prayer, Hajj and the reading of the Qur’aan attributed to his parents or are they attributed to him?
A. The good deeds of a child who has not yet reached the age of puberty and their rewards are for him and not for his parents or anyone else. His parents are rewarded for having taught him to perform these deeds, for directing him to do good and for helping him in them. This is indicated by the hadeeth in Saheeh Muslim, narrated by Ibn Abbaas, that a woman lifted a child to the Prophet, salallahu ‘alayhi wa salam, during his farewell Hajj and said: “O Messenger of Allah, is there Hajj for him?” He, salallahu ‘alayhi wa salam, replied: “Yes, and there is reward for you.”The Prophet, salallahu ‘alayhi wa salam, informed us that the Hajj is for the child, and that his mother is rewarded for her Hajj with him. Similarly, there is reward for others besides the child’s parents, for the good they do such as teaching orphans, relatives, servants and others, due to the Prophet’s, salallahu ‘alayhi wa salam, saying: “For the one who guides to good, a reward similar to that of the one who performs it.” Narrated in Saheeh Muslim. This is because it is from the assisting one another in virtue and fearfulness of Allah and that He, Glory be to Him, rewards for this.
Shaykh Ibn Baaz, rahimahullah [Fataawa Islaamiyyah: 4/526]
(Also in Islamic Fataawa Regarding the Muslim Child, page 15)