I did the obligatory Hajj a few years before I became religiously committed, and before I started to wear hijab. Praise be to Allaah, now I have started to adhere to Islam and I wear hijab and niqaab. Do I have to do the obligatory Hajj again or not?.
We praise Allaah for having guided you to obey Him and seek His pleasure, and we ask Him to make you steadfast until you meet Him.
The Hajj that you did before is sufficient and counts as the obligatory Hajj, and you do not have to repeat it, even though you were falling short in your religious commitment and wearing hijab, unless at that time you also neglected the prayer and persisted in missing prayers even during Hajj. In that case your Hajj does not count because not praying constitutes kufr, and Hajj is not valid if there is kufr.
Shaykh Ibn ‘Uthaymeen (may Allaah have mercy on him) was asked: If a person who does not pray or fast does Hajj, what is the ruling on his Hajj when he is in that state?
He replied: Not praying is kufr that puts a person beyond the pale of Islam and means that he is doomed to eternity in Hell, as is indicated in the Qur’aan and Sunnah and the words of the righteous salaf (may Allaah have mercy on them). Based on that, it is not permissible for this man who does not pray or fast to enter Makkah, because Allaah says (interpretation of the meaning):
“Verily, the Mushrikoon (polytheists, pagans, idolaters, disbelievers in the Oneness of Allaah, and in the Message of Muhammad) are Najasun (impure). So let them not come near Al‑Masjid Al-Haraam (at Makkah) after this year”
The Hajj that he did when he did not pray is not valid and not acceptable, because it was done by a kaafir, and acts of worship done by a kaafir are not valid, because Allaah says (interpretation of the meaning):
“And nothing prevents their contributions from being accepted from them except that they disbelieved in Allaah and in His Messenger (Muhammad), and that they came not to As-Salaah (the prayer) except in a lazy state, and that they offer not contributions but unwillingly”
End quote from Majmoo’ Fataawa Ibn ‘Uthaymeen (21/45).
And Allaah knows best.