In order for Hajj to be obligatory for a woman, it is essential for her to have a mahram with her , and it is not permissible for her to travel for Hajj, whether that is an obligatory or nafl Hajj, without a mahram. The Prophet (peace and blessings of Allah be upon him) said: “No woman should travel except with a mahram.” (Narrated by al-Bukhari, 1862; Muslim 1341).
The mahram is her husband or one whom it is permanently forbidden for her to marry because of blood ties, breastfeeding or ties through marriage. The husband of a sister, maternal aunt or paternal aunt is not a mahram.
Some women take this matter lightly and travel with their sister and sister’s husband, or with a maternal aunt and the aunt’s husband, but this is haram, because the sister’s husband or the maternal aunt’s husband is not a mahram, so it is not permissible for her to travel with him. So there is the fear that her Hajj is not proper, for the proper Hajj (Hajj mabrur) is that which is not mixed with any sin, but this woman is sinning throughout her journey until she returns home.
It is also essential that the mahram be an adult of sound mind, because the aim of the mahram is to protect the woman, and a child or one who is insane cannot do that.
If a woman does not have a mahram, or she has one but he is unable to travel with her, then she is not obliged to do Hajj.