Allah (swt) has not ordered us to follow any mujtahid, imam or mazhab, rather He (swt) ordered us to adopt the hukm Shar’i. He ordered us to adopt what the Messenger (saw) brought and to abstain from what he (saw) has forbidden us. He (swt) said:
وَمَا آَتَاكُمُ الرَّسُولُ فَخُذُوهُ وَمَا نَهَاكُمْ عَنْهُ فَانْتَهُوا
“And whatsoever the Messenger (saw) gives you, take it, and whatsoever he forbids you, abstain (from it)” [TMQ Hashr: 7].
Therefore, the Shari’ah does not deem it right for us to follow the people except the rules of Allah (swt). However, the reality of taqleed has led the Muslims to follow the rules of certain mujtahids whom they have assigned as imams for themselves, and they made the rules these mujtahids have deduced by their ijtihad as a mazhab for themselves. So the Shafi’is, Hanafis, Malikis, Hanbalis, Ja’faris and Zaidis etc have an actual presence amongst the Muslims. Even though these people follow the shari’ah rules which have been deduced by these mujtahids, their action is legitimate because it constitutes following a Shari’ah rule. As for if they followed the mujtahid as a person and not his deduction, then their action is not lawful and what they follow is not considered a shari’ah rule. This is because it is a statement of a person which is not from the orders and prohibitions of Allah (swt) which have been brought to us by the Messenger of Allah, Muhammad (saw). Consequently, all those who follow mazhabs must understand that they are following only the rules of Allah (swt) which have been deduced by those imams. If they have a contrary understanding then they will be answerable to Allah (swt) for leaving the rules of Allah (swt) and following people who are themselves the servants of Allah (swt).
This is from the perspective of following the rules of a mazhab. As for the perspective of leaving these rules, it has to be examined. If someone adopted a hukm but has not acted upon it yet then he has the right to leave it and adopt another hukm based on one of the preponderant qualifications which is linked to seeking the pleasure of Allah (swt). If he, in actuality, practised it then this hukm has become the rule of Allah (swt) with respect to him. It is not permitted for him to leave it and adopt another hukm except when the second hukm is linked with an evidence and the first hukm is not linked to an evidence or if it was proven to him by way of learning that the evidence of the second hukm is stronger than the first and he is convinced of that, in that case it is incumbent on him to leave the first hukm. This is because his conviction and trust in the shari’ah evidence has made it the rule of Allah (swt) with respect to him, This is analogous to the mujtahid, when he finds an evidence stronger than the evidence from which he deduced the hukm then he must leave the previous opinion and adopt the new opinion due to the strength of the evidence. In any other situation, it is not allowed for the muqallid to leave the hukm he had followed and adopt a different hukm after he had already acted according to the first hukm.
As for making taqleed to another mujtahid for another hukm that is permitted due to the ijma’ of the Sahabah which has taken place on allowing the muqallid to seek legal verdicts from any learned person in an issue. As for when the muqallid selects a mazhab such as the mazhab of Shafi’i or Ja’far for example, and he says; I follow his mazhab and adhere to it, there are some details for this: he is not allowed to follow any other mujtahid in a question he has already practised according to the mazhab he is following; while any questions he had not acted upon before he is allowed to follow other mujtahidin in those questions.
However, it should be made clear that the question (mas-ala) for which it is allowed for him to leave the hukm that he has been following for another hukm, it is stipulated that the question should be separate from other questions, and that leaving it does not entail infringement of other Shari’ah rules. As for when the question is connected to other questions then it is not allowed for him to leave it unless he leaves all the questions connected to it, because they are all considered as one question. For instance; if the question was a condition in another hukm, or one of the pillars (arkan) of a complete action such as the prayer (salah), wudu (ablution) and pillars (arkan) of the Salah. Thus, it is not correct for a Shafi’i to follow Abu Hanifah’s opinion that touching the women does not invalidate the wudu and continue praying according to the mazhab of al-Shafi’i. It is not right for him to follow the one who takes the opinion that constantly moving in prayer (to whatever extent this may be) does not invalidate the prayer or that the recitation of the Fatihah is not one of the pillars of prayer and then he continues to pray as a muqallid of the one who holds the opinion that constantly moving in prayer does invalidate it or that the Fatihah is one of the pillars of the prayer. The hukm which one is allowed to leave is that hukm whose relinquishment does not affect the actions which are undertaken according to other shari’ah rules.