In part of his celebrated and exhaustive commentary on al-Arba’een al-Nawawi, al-haafidh ibn Rajab al-Hanbali mentioned the following important points regarding the one’s intention for worship and how this is discussed in the Qur’an:
واعلم أن النية في اللغة نوع من القصد والإرادة وإن كان قد فرق بين هذه الألفاظ بما ليس هذا موضع ذكره. ـ
You should know that the word “niyyah” linguistically refers to a type of intention or desire even if one could further delineate these terms, but now is not the time to go into that.
والنية في كلام العلماء تقع بمعنيين: ـ
When the scholars talk about niyyah it can have one of two meanings:
أحدهما: تمييز العبادات بعضها عن بعض كتمييز صلاة الظهر من صلاة العصر مثلًا وتمييز رمضان من صيام غيره أو تمييز العبادات من العادات كتمييز الغسل من الجنابة من غسل التبرد والتنظيف ونحو ذلك وهذه النية هي التي توجد كثيرًا في كلام الفقهاء في كتبهم. ـ
First: Distinguishing different acts of worship from one another, such as differentiating between the Thuhr prayer and the ‘Asr prayer or between fasting during Ramadan and fasting outside of it, or distinguishing an act of worship from an act of habit such as differentiating between a ghusl one takes to remove ritual impurity verses a bath one takes to cool off or wash up or the likes. It is this usage of the word “niyyah” that you will find most commonly in the speech and writings of the scholars of fiqh.
والمعنى الثاني: بمعنى تمييز المقصود بالعمل وهل هو لله وحده لا شريك له أم غيره أم لله وغيره وهذه هي النية التي يتكلم فيها العارفون في كتبهم في كلامهم على الإخلاص وتوابعه وهي التي توجد كثيرًا في كلام السلف المتقدمين . ـ
Second: That it comes with the meaning of distinguishing the intention behind one’s action: is it for Allah alone with not partners, or is it someone other than Allah, or for Allah and someone else simultaneously? This is the niyyah that those devoted to worship speak about in their writings and speeches, referring to ikhlaas and what accompanies that, and this is the usage of the word that you will find most commonly in the speech of the early generations of the salaf.
وقد صنف أبو بكر بن أبي الدنيا مصنفًا سماه كتاب الإخلاص والنية وإنما أراد هذه النية وهي النية التي يتكرر ذكرها في كلام النبي ﷺ تارة بلفظ النية وتارة بلفظ الإرادة وتارة بلفظ مقارب لذلك. ـ
Abu Bakr ibn Abi’l-Dunya wrote a book entitled Kitaab al-Ikhlaas wa’l-Niyyah which is strictly dealing with this second meaning of the word “niyyah“. This is the niyyah that is frequently referred to in the sayings of the Prophet, sometimes being referred to by the word “niyyah” itself, other times being referred to by the word “al-iraadah” – “want/desire” – and other times with other words of close meaning.
وقد جاء ذكرها كثيرًا في كتاب الله عز وجل بغير لفظ النية أيضًا من الألفاظ المقاربة لها… ـ
And this second meaning is also frequently mentioned in the Qur’an but without using the word “niyyah” itself and instead using other closely-related words …