Can a Muslim be forgiven after becoming a disbeliever by committing Shirk (joining partners with Allah), but then repenting? Please justify your answer.
Praise be to Allah, the Lord of the World; and may His blessings and peace be upon our Prophet Muhammad and upon all his Family and Companions.
The Muslim who happens to fall into Shirk, minor or major, has to repent to Allah before repentance becomes impossible. Allah forgives sins as He Says: {And those who invoke not any other ilâh (god) along with Allâh, nor kill such life as Allâh has forbidden, except for just cause, nor commit illegal sexual intercourse and whoever does this shall receive the punishment. The torment will be doubled to him on the Day of Resurrection, and he will abide therein in disgrace; Except those who repent and believe (in Islâmic Monotheism), and do righteous deeds, for those, Allâh will change their sins into good deeds, and Allâh is Oft-Forgiving, Most Merciful.} [25: 68-70]. Allah also Says: {Say: "O 'Ibâdî (My slaves) who have transgressed against themselves (by committing evil deeds and sins)! Despair not of the Mercy of Allâh, verily Allâh forgives all sins. Truly, He is Oft-Forgiving, Most Merciful.} [39: 53].
But if the person dies while on his Shirk, Allah does not forgive him if it is a major Shirk. But if it is a minor Shirk, then Allah might forgive him or He might punish him for it.
Some scholars like Ibn Taymiyah believe that Allah does not forgive any kind of Shirk. But according to them the person who only committed minor Shirk will be punished with the punishment he deserves. But he will ultimately go to Paradise as he did not go out of Islam by his Shirk. But the person who commits major Shirk will dwell in Hell forever if he does not repent before repentance becomes impossible. Repentance becomes impossible when the person starts gurgling before breathing his last breath and when the sunrises from the West.
Allah knows best.
You can search for fatwa through many choices