Repentance from a Deliberate Sin
At this point, it should be noted that the Holy Qur’an has used the words “in ignorance” which apparently gives an impression that the repentance may be accepted when a sin is committed unintentionally and unknowingly. But if it is committed deliberately, it will not be
acceptable. However, according to the explanation of this verse given by the noble Companions, may Allah be pleased with them all, the word, “jahalah” (ignorance) here does not mean that a sinning person is not aware of a sin as sin, or has no intention or volition to commit a sin. Instead, it means that it was the insensitivity and heedlessness of a person towards the evil end of sin and its ultimate punishment which became the cause of his audacity to venture into sin, even though he knew a sin as sin, and had approached it with intention and volition as well.
In other words, the word, “jahalah” or ignorance used here is in the sense of carelessness or stupidity. This is supported by an evidence in Surah Yusuf. Sayyidna Yusuf (AS) had said to his brothers: (قَالَ هَلْ عَلِمْتُم مَّا فَعَلْتُم بِيُوسُفَ وَأَخِيهِ إِذْ أَنتُمْ جَـٰهِلُونَ). Here the brothers have been called, “jahilun”, the ignorant ones, although what they did was not the outcome of any error or forgetfulness but they had done that knowingly and with full deliberation. Yet, it is because of their heedlessness towards the evil end of their act that they have been called “jahil” (ignorant).
[Maarif ul Quran Vol-2 (pg 363 – 364), Maktabah Dar al Uloom, Translation by Prof. Muhammad Hasan Askari & Prof. Muhammad Shamim]