ISLAM attaches the utmost importance to intentions. No action is acceptable to God purely on the basis of outer appearance. God accepts only such actions as are performed with proper intention and rejects those performed with ill-intention. Right intention is the moral purposiveness which underlies all actions performed solely for God’s pleasure. One who acts on such feelings will be rewarded by God in the Hereafter. Ill-intention, on the other hand, is a negative spur to worldly attainment. Ostensibly religious acts, if performed for worldly gain or public commendation, are in this sense illintentioned. Any fame, honour or popularity which ensues from an ill-intentioned act is a hollow triumph and is looked upon by the Almighty with extreme disfavour.
According to an authentic hadith: Copy Arabic text (Sahih al-Bukhari 1) Actions depend upon intention. A person will get that which he intended for.
Niyyat means intention. The spirit of Islam is the intention of an individual. The worship you perform has an inner spirit. Everything has a form and an inner spirit. The spirit or intention is the essence. Intention means: whatever you do be it speaking, giving a speech, leading life with a good character, doing goodness with people, giving donation to people, helping others, in whatever you do, your intention should be: you are doing for the sake of God.
The Quran says: Copy Arabic text (76:9) When believers give away anything or help a person, their hearts are full of this spirit: We feed you for the sake of God alone.
This is the spirit of pleasing God, so that God accepts our actions. Whatever action you perform in this world, be it worship, helping someone, living with good behaviour in society, the intention behind every action should be to please God. For example, if you live with good character in society, but your intention is to please people and receive their praise, then this attitude is not valued in Islam. You won't receive reward for this in the Hereafter.