Shaykh al-Islām Ibn Taymiyyah, may Allah have mercy on him, said: “Under normal circumstances, it is inconceivable that a man should believe in his heart, acknowledge that Allah has made prayer obligatory upon him, and commit himself to the Prophet’s law and what he brought, yet refuse the ruler’s command to pray until he is executed, while remaining a believer inwardly. Never; such a person can only be a disbeliever.
If he were to say, ‘I acknowledge that it is obligatory, but I will not perform it,’ his statement in these circumstances would be a lie. This is like someone throwing a copy of the Quran into a latrine while saying, ‘I testify that what it contains is the speech of Allah,’ or killing one of the prophets while saying, ‘I testify that he is the Messenger of Allah,’ and other such actions that contradict faith in the heart. If, in such circumstances, he says, ‘I believe in my heart,’ he is lying in what he professes” (1).
As for the questioner’s words, “Is a poor upbringing an excuse for the disbelief of someone who insults Allah or His Messenger?”
The answer is:
Insulting Allah and His Messenger is among the clear nullifiers of Islam, because it shows contempt for Allah and His Messenger. This contradicts the reverence for Allah and His Messenger required by the two testimonies of faith.
A poor upbringing does not excuse a person accountable under Islamic law for neglecting an obligation,