Intention is of utmost important in Islam. No act, simply on account of its appearance of being commendable can be acceptable to God. God accepts only such deeds as have been performed with the right intention. No act done with evil intention is acceptable to God.
When a person performs some task solely for God’s pleasure and with the aim of being rewarded for it in the Hereafter, that shows he is a person of good intention.
On the contrary, when a person acts in a way that is ostensibly religious, with the hope of promoting some worldly interest thereby, receiving appreciation, gaining in popularity among others and finding a place of honour among them, that shows an evil intention.
Intention relates to one’s thinking or inner state. People may not be able to discover the inner state of a person’s mind when he performs a certain action. But God is fully cognizant of what is going on in his mind. He knows what kind of feelings he had at that time. People may mistake an evil act for a good act, but God has full knowledge of all things and will deal with everyone accordingly. He will reward a person exactly as he deserves.
The significance of intention is that of truth and meaningfulness. When something is lacking in truth and meaningfulness, it is of no value. Indeed, any act which is done without the right intention is valueless. It has no importance either in the eyes of people or in the eyes of God.
An act is worthy of esteem only when it is pure in intention. Any act done without the right intention is impure in nature.