To spell this out: commanding what is right and forbidding what is wrong is one of the most obligatory, most meritorious, and finest of all deeds.
Allah, Exalted is He, says,
“so that He may test you to see which of you is best in deeds.” ⦗al-Mulk 2⦘
Al-Fudayl ibn ʿIyāḍ—may Allah have mercy on him—explained that “best” (aḥsan) means “the most sincere and the most correct.” He said, “If a deed is sincere but not correct, it will not be accepted; it must be both sincere and correct.”
• Sincere (khāliṣ): that it is done for Allah alone.
• Correct (ṣawāb): that it conforms to the sunnah.
Thus a righteous deed must be performed purely for the Face of Allah, for Allah accepts only those deeds meant solely for Him. In the authentic hadith the Prophet ﷺ relates that Allah says:
“I am the One most free of any need for partners. Whoever performs a deed in which he associates someone else with Me, I disown him; the whole of it is for the one he associated with Me.”
This is monotheism (tawḥīd)—the foundation of Islam, the religion with which Allah sent all His messengers and for whose sake He created the creation. It is His right over His servants that they worship Him and associate nothing with Him. Along with that, the deed itself must be righteous—that is, something Allah and His Messenger have commanded. Such obedience is a righteous deed; every act of obedience is a righteous deed, and every righteous deed is an act of obedience. It is the prescribed, legislated act: whatever the Law has enjoined, whether as an obligation or a recommendation. This is the righteous, good, virtuous deed, the act of piety and goodness, while its opposite is disobedience—a corrupt deed, a sin, wickedness, and injustice.
[Conditions Required of the One Who Commands and Forbids]
Because every deed requires two elements—intention and movement—the Prophet ﷺ said,
“The truest names are Ḥārith and Hammām,”
for everyone is a ḥārith (one who acts)