Firstly, it should be known that Islam does not allow adoption, in the sense that somebody takes a child and name him after his name as being his father and gives him all the rights of real children, including heritance, familial rights, etc.
Sheikh Muhammad Ibn Ibrahim (may Allah have mercy on him) said,
“Adoption of children is of two types; forbidden and permissible. The forbidden type means adopting a child in the sense that the child is considered to be the child of the adopting parent and subject to the rulings on real children. This is not allowed in Islam because it has been abolished by Allah in the Qur’an. Allah says: “…nor has He made your adopted sons your real sons…” (Al-Ahzab, 4)
The kind which is prescribed and may be religiously desirable is that which only involves kindness towards the child and giving him a righteous religious upbringing and sound direction, teaching him that which will benefit him in this world and the next…”
With this brief explanation, it becomes clear that a woman, who cared for a child from his early years, is not his mother in the sight of Islam. Of course, her work is highly appreciated and esteemed, may Allah accept all her deeds and give her the best reward in paradise for a great work done! However, this does not place her in an advanced position over the real mother, as the latter is the child’s real mother who carried, bore the pains of pregnancy, passed nights and days dreaming of a bright future for her child, and other innumerable things.
After one’s mother dies, it is Sunnah to fulfill any vows that she had made such as giving charity, performing Hajj and ‘Umrah, etc., on her behalf. It was reported from Ibn ‘Abbas (may Allah be pleased with them both) that a woman from Juhaynah came to the Prophet (peace and blessings of Allah be upon him) and said: “My mother vowed to go for Hajj, but she died before she did so. Can I perform Hajj on her behalf?” He said, “Yes, perform Hajj on her behalf. Do you not think that if your mother owed a debt that you would pay it off for her? Fulfill her debt to Allah, for Allah’s debt deserves more to be settled.” (Narrated by Al-Bukhari)
Also, the Prophet (peace be upon him) said, “When a person dies, all his deeds come to an end except three: sadaqahjaariyah (ongoing charity, e.g. a waqf or endowment), beneficial knowledge (which he has left behind), or a righteous child who will pray for him.” (Reported by Al-Tirmidhi)
Hence, it is our advice that a child performs Hajj on behalf on his mother who gave birth to him and to supplicate Allah for her as much as he can. As regards the the adoptive mother who brought him up, in sha’ Allah, he may perform Hajj on behalf of her in the coming years together with the aforementioned acts on behalf of her as well.
May Allah guide all to what pleases Him