All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
Hajj was not obligatory on your brother as he died before puberty; reaching the age of puberty is one of the conditions for Hajj. However, if you want to perform an optional Hajj on behalf of your deceased brother, then this is sufficient, and he gets the reward of Hajj. However, it is a condition that you should have already performed Hajj on yourself.
Shaykh Ibn 'Uthaymeen said in Majmoo’ al-Fataawa:
“The famous view of Imam Ahmad is that it is permissible to perform an obligatory or optional Hajj on behalf of the dead as 'Abdullah ibn ‘Abbaas narrated that the Prophet heard a man saying: "Labbayka (Here I am) on behalf of Shubrumah." [i.e. he was performing Hajj on behalf of Shubrumah]. He (the Prophet) asked, "Who is Shubrumah?" The man replied, "He is a brother (or a relative) of mine." The Prophet asked, "Have you performed Hajj for yourself?" The man said, "No." Then the Prophet told him, "Perform Hajj for yourself first, then perform Hajj on behalf of Shubrumah."
The general meaning of this Hadeeth indicates that it is permissible to perform optional Hajj on behalf of a dead person because the Prophet did not ask this man about the kind of Hajj that he is performing on behalf of Shubrumah, whether it is an optional or obligatory Hajj, and whether Shubrumah was alive or dead.” [End of quote]
Allah knows best.