From Abdullah bin Mas'ud, may Allah be pleased with him, he said: The Messenger of Allah, peace and blessings be upon him, said: "Destroyed are the extremists, destroyed are the extremists, destroyed are the extremists." Narrated by Muslim.
Al-Nawawi said (in his explanation of Sahih Muslim): "Al-Mutanatti'un: those who delve deeply, the extremists, those who exceed the limits in their words and deeds."
Extremism in religion is: exceeding the legal limit by adding to what the Sharia has brought, whether in belief or in action. The Sharia has condemned negligence and condemned excess, and it has brought justice and the path of moderation in belief and in action.
This is why Ibn al-Qayyim, may Allah have mercy on him, says (in Madarij al-Salikin): "Allah has not commanded anything except that Satan has two inclinations towards it; either to negligence and abandonment, or to excess and extremism, and the religion of Allah is moderation between the one who deviates from it and the one who goes to extremes in it."
Just as the one who deviates from the command is negligent by falling short of the limit, the one who goes to extremes in it is also negligent by exceeding the limit. Extremism divides the Ummah, opens the door to innovations wide open, and makes the inviolable blood and wealth permissible. Then the extremist thinks he is right in many cases, so he continues in his misguidance and his extremism.
And among the greatest manifestations of extremism in religion is: (declaring Muslims as infidels without legal evidence from the Book or the Sunnah). For he who has a bit of piety and religion, or a fragment of knowledge and certainty, does not rush to declare others as infidels, because declaring someone an infidel has dire consequences, a hideous fruit, it cracks believing hearts and frightens reassured souls.