It has been narrated in Hadith by Ibn `Abbas (RA) that a woman lifted up a young boy to the Prophet (pbuh) and said: "Would this child be credited with having performed the Hajj?" Thereupon he said: "Yes, and you will have a reward."
Moreover, it was reported in Sahih Al-Bukhari by Al-Sa'ib Ibn Yazid (may Allah be pleased with him) who said: "I was seven years old when I was taken to perform Hajj with the Prophet (pbuh)." However, such Hajj does not exempt the person from the obligatory Hajj.
The Hajj performed by children is acceptable but they will have to perform the obligatory Hajj again after they reach the age of maturity. The guardian/parent should make the intention of entering Ihram for Hajj on behalf of the child if he is under the age of discernment. The same applies for a girl child below the age of discernment. Minimum Hajj age requirement according to shariah is puberty. A person must reach the age of puberty to perform the obligatory Hajj.
Children who have reached the age of discernment should seek their guardian’s permission before assuming Ihram. They must do all the rituals of Ihram themselves. The guardian can manage their affairs and perform the rituals on their behalf that they cannot perform themselves which includes stoning at Jamarat. However, the child is required to perform other rituals themselves including standing on Arafat, spending night in Mina and Muzdalifah and, performing Tawaf and Saa’ee.
Note: It is recommended to consult and seek an opinion from scholars on doubtful Islamic matters.