Praise be to Allah.
The saheeh Sunnah indicates that a child may do Hajj and be rewarded for it, but that does not count as the “Hajj of Islam” (obligatory Hajj). Muslim (2378) narrated that Ibn ‘Abbaas (may Allaah be pleased with him) said: A woman lifted up a child of hers and said: O Messenger of Allaah, is there Hajj for this one? He said: “Yes, and you will have the reward.”
Al-Nawawi said in Sharh Muslim:
This is used as evidence by al-Shaafa’i, Maalik, Ahmad and the majority of scholars that the Hajj of a child counts and is valid, and he will be rewarded for it, but it does not count as the Hajj of Islam (the obligatory Hajj), rather it is regarded as a voluntary Hajj. This hadeeth clearly states that.
Al-Qaadi said: They are unanimously agreed that it does not count as the obligatory Hajj, which he must do after he reaches puberty, except for a small group who held an odd view and said that it does count. But the scholars did not pay any attention to this view.
The words of the Prophet (peace and blessings of Allaah be upon him) “and you will have the reward” mean that this is because of her carrying him and making him avoid the things that are forbidden to the pilgrim in ihraam, and do what the pilgrim does. End quote.
It is Hajj for him in the sense of reward, without being counted as Hajj in the sense of obligatory Hajj if he lives until he reaches puberty and becomes a man. This is like prayer; he should be told to pray when he becomes able to pray, although it is not obligatory for him, and the reward will be written for him by the bounty of Allaah, and also for the one who tells him to pray and teaches him to do so. If he does Hajj then he must do the all the rituals, such as standing in ‘Arafah and circumambulating around the Ka’bah, being carried if he is unable to walk, and doing saa’i between al-Safa and al-Marwah, and other actions of Hajj. End quote from ‘Awn al-Ma’bood.
Al-Tirmidhi (926) narrated that al-Saa’ib ibn Yazeed said: My father took me for Hajj with the Messenger of Allaah (peace and blessings of Allaah be upon him) during the Farewell Pilgrimage when I was seven years old. Classed as saheeh by al-Albaani in Saheeh al-Tirmidhi.
And it was narrated from Ibn ‘Abbaas (may Allaah be pleased with him) that the Prophet (peace and blessings of Allaah be upon him) said: “Any child who does Hajj then reaches puberty, he must do Hajj again.” Narrated by al-Shaafa’i in his Musnad; classed as saheeh by al-Albaani in Irwa’ al-Ghaleel (686).
And Allaah knows best.