It should be known that our saying “ignorance is an excuse” does not mean that we encourage and call to ignorance, that ignorance has any merits, or that we are satisfied and pleased with it. Rather it is as one of the Salaf (righteous predecessors) said: “Allah has not been disobeyed with any sin worse than ignorance.”
Ignorance is the reason for sin and it incites sin and leads to it. Ibn Al-Qayyim says, “Yusuf, the eminently truthful and upright, said: ‘Unless You turn away their plot from me, I will feel inclined towards them and be one of the ignorant ones (jahileen).’ (Qur’an, 12:33) The word ‘Jahil’ (ignorant) means Those who do that which you have forbidden.”
Allah says: “Allah accepts only the repentance of those who do evil in ignorance and foolishness and repent soon afterward.” (Qur’an, 4:17)

Qatadah said: “The Companions of the Messenger of Allah (peace be upon him) agreed that everything by which Allah is disobeyed is ignorance.”

Others said. “The Companions agreed that anyone who disobeys Allah is an ignorant one (Jahil).”

Caliph Ali (may Allah be pleased with him) said, “It is enough honor for knowledge that he who is not able leaves it and one becomes happy if he is labeled with it, and it is enough of a censure for ignorance that its people disassociate themselves from it.” (Madarijus-Salikeen, 1/470 and Dhammul-Jahl of Ibn Rusulan)

Someone said, “There is in ignorance a death for its people before death, and their bodies before burial are graves, and their souls are in grief on account of their bodies, and there is no resurrection for them (from death) until the Resurrection.”

The cure for ignorance is to ask and learn, as the Messenger of Allah (peace be upon him) said, “Indeed the cure for ignorance is to ask.” (Ahmad, Abu Dawood, and Ibn Majah)

So, he made ignorance a disease and declared asking to be its cure. And Ibn Al-Qayyim said in his Ash-Shafiyatul-Kafiyah, “Ignorance is a fatal malady and its cure is in two things in agreement: A text from the Qur’an or from the Sunnah, and a physician possessing knowledge of the Religion.”