To begin, we would like to stress that the Muslim enters Paradise through the Mercy and Grace of Allah that He bestows on His servants because nobody’s actions are comparable to or even get close to the reward that Allah Almighty gives.
Still, we are asked to do good deeds during our lifetime. That is why many verses in the Qur’an and Hadiths encourage us to do good deeds and avoid the bad ones so as to enter Paradise. Allah has prepared for His believing servants in Paradise that which no eye has seen, no ear has heard, nor anyone imagined, to the extent that even the person who has the least blessings in Paradise will think that he is the most blessed among them. Abu Sa`id al-Khudri (may Allah be pleased with him) reported that the Prophet (peace and blessings be upon him) said: “The lowest of people in status in Paradise will be a man whose face Allah turns away from the Fire towards Paradise, and shows him a tree giving shade. He will say, ‘O Lord, bring me closer to that tree so that I may be in its shade… Then he will enter his house (in Paradise) and his two wives from among Al-Hoor Al-`een (houris) will come in and say to him, ‘Praise be to Allah who brought you to life for us and brought us to life for you.’ Then he will say, ‘No one has been given what I have been given.’” (Reported by Muslim)
Sheikh `Atiyyah Saqr, former head of Al-Azhar Fatwa Committee, states the following:
“Before tackling the point raised in the question, I would like to mention the following Prophetic Hadith.
Abu Dharr (may Allah be pleased with him) reported: I came to the Prophet (peace and blessings be upon him) while he was wearing white clothes and sleeping. I went back to him again after he had got up from his sleep. He said, “Nobody says, ‘None has the right to be worshipped but Allah’ and then later on he dies while believing in that, except that he will enter Paradise.” I said, “Even if he had committed illegal sexual intercourse and theft?” He said, “Even if he had committed illegal sexual intercourse and theft.” I said, “Even if he had committed illegal sexual intercourse and theft?” He said, “Even if he had committed illegal sexual intercourse and theft, in spite of Abu Dharr’s disliking (it).” Abu `Abdullah said, “This is at the time of death or before it if one repents and regrets and says, ‘None has the right to be worshipped but Allah.’ He will be forgiven his sins.”
In light of the above Hadith, it has become clear now that as long as one believes in Allah and dies as a believer, then he will enter Paradise, in sha’ Allah. If that Muslim dies while he has committed sins of which he did not repent, then his fate is left to the Mercy of Allah, Who may forgive him according to His Will. Also, that person may enter the Hellfire for some time as a punishment for the sins he committed. At last, that sinful person will enter Paradise, in sha’ Allah as Allah Almighty says, “Lo! Allah forgiveth not that a partner should be ascribed unto Him. He forgiveth (all) save that to whom He will. Whoso ascribeth partners to Allah, he hath indeed invented a tremendous sin.” (An-Nisa’: 48)
The Prophet (peace and blessings be upon him) is reported to have said, “Allah Almighty has forbidden the one who utters, ‘La Ilaha Illa Allah (there is no god but Allah)’ for Allah’s Sake to enter the Hellfire.” “Enter the Hellfire” in this Hadith means having it as a permanent abode.
Having clarified the above, I add that there is no contradiction between what is stated above and the Prophetic Hadiths such as “The adulterer is not a believer at the moment when he is committing adultery; the wine-drinker is not a believer at the moment when he is drinking wine; the thief is not a believer at the moment when he is stealing; the robber is not a believer at the moment when he is robbing and the people are looking on.” (Narrated by Al-Bukhari, 2475; Muslim, 57).
The unbelief referred to in the above Hadith doesn’t constitute complete unbelief. Rather, it refers to the fact that with such sins, the person’s faith is not categorically cancelled, although it decreases.
Also, we can’t call the person who does such sins a disbeliever as long as he does not deem or declare the permissibility of what he is doing as lawful.”