Prayer is one of the most important obligations of Islam, being one of the five pillars of Islam. A Muslim should not miss any prayer; and all prayers should be performed in their appointed times. Allah says in the Qur’an: “Indeed the prayers are enjoined on Believers at stated times.” (An-Nisa’: 103) In a hadith the Prophet (peace and blessings be upon him) said, “Allah has made five prayers obligatory upon His servants. So whosoever will perform them and will not miss any of them out of negligence, he has the pledge of Allah that He will enter him in Paradise. And whosoever will not perform them, Allah has no pledge with him. If He wills He may punish him, and if He wills He may forgive him.” (Reported by An-Nasa’i, Abu Dawud and Ahmad).

Answering the question, Sheikh Ahmad Kutty, a senior lecturer and Islamic scholar at the Islamic Institute of Toronto, Ontario, Canada, states:
Salah is the most important pillar of Islam. It is in fact the first religious duty prescribed on every single prophet from Adam to Muhammad, second only to testifying the Oneness of Allah. Allah says, Salah, indeed, is a duty enjoined upon the faithful at the appointed times.” (An-Nisa’: 103). The Prophet (peace and blessings be upon him) further narrates in a hadith Qudsi: Allah said: “The covenant between Us and them is Salah; so whoever establishes it establishes religion; whoever undermines it undermines religion.”

It is therefore important that we never become slack in performing salah; if we miss any salah for whatever reason, we must pray it immediately without further delay. The Prophet (peace and blessings be upon him) said, “Whoever oversleeps and misses his prayer or forgets to do it, let him pray as soon as he remembers it.”

In light of these and other evidence, the vast majority of scholars and imams are of the opinion that one must make up for all of the prayers one has missed in life, no matter how many they are. So according to them, the person who missed a number of salah should make up for all of these prayers.

One of the best ways to do this—as has been suggested by one scholar—is to pray with each fard that you perform another fard in lieu of what you missed in the past. Thus, for instance, before or after praying Zuhr, pray another four rak`ahs of Zuhr as qadha’, and pray another four rak`ahs of `Asr every time you pray `Asr; you should continue to do this until such time that you can be pretty sure that you have made up for all of the missed prayers.

However, the above view has been rejected by scholars such as Imam Ibn Taymiyah, Shawkani, and Ibn Hazm. They are of the view that a person who has deliberately missed his prayers can never make up for them. Therefore, the only option left for him is to repent, ask forgiveness of Allah, and do lots of good works; by doing so he can hope to receive Allah’s mercy.

Ibn Taymiyyah, while advancing this point of view, further states: “To insist that a person who has strayed away from Islam for a number of years and then returns to the fold of Islam must make qadha’ of all his missed prayers serves only as a deterrent against his repentance, and thus it amounts to limiting the infinite mercy of Allah.” He, therefore, dismisses this view and rules that it is sufficient for him to repent, make lots of istighfar (asking forgiveness) and good works.
Having said this, I must add that he must never be slack again in your prayers.
May Allah shower us all with His mercy and help us to remain steadfast in His religion. Ameen.”

Moreover, the eminent Muslim scholar, Dr. Su`ad Salih, professor of Fiqh at Al-Azhar University, states:

“Brother in Islam, bear in mind that in Islam, takleef (accountability) depends on maturity and sound mind. The Prophet (peace and blessings be upon him) stated that three people are not accountable for their actions: 1) the child until he becomes mature, 2) the insane until he is of sound mind, and 3) the sleeping person until he wakes up.

Accordingly, scholars of Islam state that being sane and mature are conditions for accountability. There are some reasons that could suspend the person’s accountability such as forgetfulness and compulsion. Then, a sane and mature Muslim should carry out his duties — such as prayer — as long as there is nothing that hinders him from doing so. Prayer is one of the most important pillars of Islam.

As for the prayers you have missed, you should make up for them at their due times. You can pray each prayer twice: one for the current prayer and the other for making up for the missed one.”
In the light of the above fatwas, it is clear that the one who missed prayers for many years may count the missed prayers and make up for them in the hope that Almighty Allah will forgive him.