In fact, the matter has grown worse than that! We live in an age in which many Muslims assume that whatever actions they undertake as regards the Dîn, then they must surely be acceptable to Allâh!
Such assumptions – arising from ignorance – have played a destructive role in the collective affairs of this Ummah – may Allâh increase it in nobility – and may possibly being destructive to one’s own salvation in the Hereafter, as Allâh says: 
Say! Shall we tell you of those who lost most with respect to their actions? Those whose efforts have been wasted in this life, whilst they thought that they were acquiring good by their actions. [al-Kahf 18:103-104] 
So “the people are of three classes: The righteous Scholar, the student of Knowledge being upon the path of salvation and the confused rabble who follow everyone who calls out – bending along with every wind – they are not enlightened by the light of Knowledge, nor do they lean upon a firm support.” 
Two Essential Conditions
It is a must that two great and important matters be considered for actions to be acceptable:
Firstly: That the one undertaking the action must intend only the pleasure of Allâh – the Mighty and Majestic.
Secondly: The action must be in agreement with the Sunnah of His Messenger sallallâhu ‘alayhi wa sallam.
If any of these two conditions are not fulfilled, then the action will neither be righteous, nor accepted by Allâh. The proof for this is in His saying:
Whosoever expects to meet His Lord, then let him work actions of righteousness and in the worship of his Lord associate no one as a partner. [al-Kahf 18:110] 
In this noble âyah Allâh commanded that the action should be righteous – in agreement with the Sharî’ah – and it should be sincere – associating none with him. 
Similar to this is the saying of the Prophet – sallallâhu ‘alayhi wa sallam:
“Indeed Allâh does not look at your faces nor your wealth. But he looks at your hearts and your actions.” 
So, contrary to what many people think, sincerity alone is not sufficient for worshipping Allâh – but along with that it must be in conformity with the Sunnah. Thus the condition of the action must be such that it confirms.
Personal tastes, desires and perceptions – intellectual or otherwise(7) – are not the criteria for judging whether actions are righteous or not. Allâh says:
Who is more astray than one who follows his own desires without guidance from Allâh [al-Qasas 28:50]
Rather, a righteous action is one “that is commanded by Allah and his Messenger – and that is obedience.”  And this obedience must be upon the understanding of the companions – radiallâhu ‘anhum. Since they are for this Ummah – after its Prophetsallallâhu ‘alayhi wa sallam – the custodians of correct Knowledge (‘Ilm), action (‘Aml), belief (I’tiqâd) and methodology (Manhaj). As the Prophet ‘alayhis-salâm said:
“My Companions are the custodians for my Ummah, so when my companions go, that which has been promised to my Ummah will come to it.” 
And the Prophet sallallâhu ‘alayhi wa sallam warned us about actions which have no basis from the Book of Allâh and the Sunnah of His Messenger, by saying:
“Whosoever does an action that we have not commanded then it will be rejected.” 
Sincerity – the Essence of Tawhîd
Sincerity demands that one seeks to do actions which Allâh is pleased with, in way in which He is pleased with. The root of this is Knowledge, as one of the Imâms of theTâbi’în, az-Zuhrî (d.124H) – rahimahullâh – said: “The people will not trust the action of one who acts without knowledge; and they will not be pleased with the saying of a Scholar who does not act.” 
As regards sincerity, then it is “the stripping of ones intentions from all impurities in order to draw close to Allâh, ensuring that the intention behind all acts of worship and obedience are exclusively for his pleasure.”  As Allâh – the One free from all imperfections – says:
They have not been commanded except to worship Allâh, being sincere and making the Dîn for Him. [al-Bayyinah 98:5]
The Prophet sallallâhu ‘alayhi wa sallam said that Allâh – the Blessed, the Most High – said: “I am so self-sufficient that I am in no need of having partners. Thus, whoever does an action for someone else’s sake as well as Mine, will have that action rejected by Me to him who he associated with Me.” 
Thus, if a person does an action, then even if he performs it according to the Sunnah, but he does it so that people may speak well about him, his action thereby becomes null and void. If the deed just became void then the following hadîth would apply in such a case:
“How many fasting people obtain nothing from their fast except hunger and thirst and how many people stay up at night (praying) obtain nothing from their fast except sleeplessness and tiredness.” 
However, this is not the case. For this person’s action has turned into a sin, since he acted without intending to seek only the face of Allâh, thus associating partners Shirkalong with Allâh in his action. 
Success for the Muslims – individuals and groups – will not be attained except when actions are carried out with Sincerity, following the Sunnah, upon the Path (Sabîl) of the Pious Predecessors (as-Salaf us-Sâlihîn) as Ubayy ibn Ka’b (d.22H) – radiallâhu ‘anhu – said:
“Adhere to the Sabîl and Sunnah – who remembers the Most-Merciful and his eyes swell up with tears due to the fear of Allâh – except that he will never be touched by the fire. Indeed moderation in the Sabîl and Sunnah is better than exertion in opposition to it.” 
And our final supplication is that all praise belongs to Allâh – Lord of the Worlds.
1. All quotes are translations of the meanings of the Qur’ân.
2. Ibn Kathîr – rahimahullâh – says in his Tafsîr Qur’ân al-‘Adhîm (3/112): “It (the âyah) is general regarding everyone who worships Allâh in an unacceptable way, thinking that he is correct in it and his action is correct in it and that his action is acceptable, whereas he is in error and his action his rejected.”
3. Part of a lengthy piece of advice by ‘Alî (d.40H) radiallâhu ‘anhu to Kumail ibn Ziyâd – as is reported by Abû Nu’aym al-Asbahânî in Hilyatul-Awliyâ (1/79-80). From the principles of correction and reformation – O noble reader – as mentioned by Ibn al-Qayyim in Lighâthatul-Luhfân (p.397), is that: “The foundation of all good as knowledge and Justice and the foundation of all evil is ignorance and Oppression.” Thus the one involved in Da’wah and reformation must have adequate Sharî’ah Knowledge, or else more harm will occur than good – as the saying of old goes: Sa’d brought the camels leading them. O Sa’d – that is not the way to bring in camels!
4. Ibn Kathîr says in his Tafsîr (3/114): “So – for an action to be acceptable it has to fulfil two conditions. Firstly: It must be sincere for Allâh alone. Secondly: It must be correct in accordance with the Sharî’ah. So if the action is sincere, but not correct, it will not be acceptable.”
5. al-Lâlikâ’î relates in his Sharh Usûl I’tiqâd Ahl us-Sunnah wal-Jamâ’ah that Sa’îd ibn Jubayr (d.95H) –rahimahullâh – said: “No word is acceptable except with action and no action is acceptable except with words and no word nor action are acceptable except with intention and no word, action or intention is acceptable except when it confirms to the Sunnah.”
6. Sahîh – related by Muslim (2564), Ibn Mâjah (4143) and Ahmad (2/285) – from Abû Hurayrah radiallâhu ‘anhu. The wording with Muslim is: ” … your bodies nor your faces … ”
7. Imâm al-Barbahârî (d.329H)- the Imâm of Ahl us-Sunnah wal-Jamâ’ah of his time – says in his Kitâb Sharh as-Sunnah: “And know – may Allâh have mercy upon you – that the Dîn came from Allâh – the Blessed and Most High – and was not left to the intellect and opinions of men – and knowledge of it is with Allâh and His Messenger. So do not follow anything based upon your desires and so deviate from the Dîn … Since Allâh’s Messenger sallallâhu ‘alayhi wa sallam explained the Sunnah to his Ummah and made it clear to his Companions that they are the Jamâ’ah and the Great Majority (as-Sawâd ul-A’dham); and the Great Majority is the Truth and its People.”
8. al-Hisbah fil-Islâm (p.82) of Ibn Taymiyyah.
9. Sahîh – related by Muslim (16/82), Ahmad (4/398) and al-Baghawî in Sharh as-Sunnah (14/71-72) – from Abû Mûsa radiallâhu ‘anhu.
10. Sahîh – related by Muslim (5/132), ad-Dâraqutnî (pp.520-521) and Ahmad (6/146, 180) – from ‘Âishah –radiallâhu ‘anhâ. Refer to the Booklet: Understanding the evil of Innovations by our brother Abû Muntasir – may Allâh reward him with goodness – for a detailed explanation of this hadîth and the principles connected to it. And it is available from this Jam’iyyah – and all praise is for Allâh.
11. Iqtidâ ul-‘Ilm il ‘Aml of al-Khatîb al-Baghdâdî. Yet today, it is sufficient for one to be a speaker and that is enough credentials for him to be a guide for the Ummah – regardless of whether he has knowledge or not! So let the noble reader reflect upon the saying of the Companion Ibn Mas’ûd (d.32h), related by at-Tabaranî in al-Kabîr (8066) and al-Bukhârî in Adab al-Mufrad (789) and declared to be Sahîh (authentic) by al-Hâfidh Ibn Hajr in Fath al-Bârî (10/510) that he – radiallâhu ‘anhu – said: “You are in a time whose Scholars are many and its speakers are few. After you will come a time whose Scholars are few and its speakers are many.” How yesterday’s warning depicts today’s action!
12. Tazkyatun-Nufûs (p.4) of Ahmad Farîd.
13. Sahîh – related by Muslim, Ibn Mâjah (4202) and Ibn Khuzaymah in his Sahîh (8/223) – from Abû Hurayrah radiallâhu ‘anhu.
14. Sahîh related by at-Tabarânî in al-Kabîr – from Ibn ‘Umar and also by al-Hâkim and al-Bayhaqî – from Abû Hurayrah radiallâhu ‘anhumâ.
15. Similar to this are actions based on party-spirit (‘asabiyah) about which our Messenger sallallâhu ‘alayhi wa sallam said – as is related by Muslim in his Sahîh: “Whosoever fights under the banner of the blind, becoming angry for party-spirit, or calling to party-spirit, or assisting party-spirit, then if he dies, he dies a death of jâhiliyyah (pre-Islamic ignorance).” And how damaging – O seeker of unity – has its modern counter-part, Partisanship (Hizbiyyah), been in destroying the very fabric of comprehensive brotherhood. Such that the one immersed in this Hizbiyyah loves and hates, builds and destroys – not due to the ties of correct faith (Îmân) – but due to this vile Hizbiyyah – thereby having enmity for the friends (‘awliyâ) of Allâh, competing thereby with the enemies of the Prophets!!! We seek Allâh’s protection against this and only He guides to a way that is Straight.
16. Related by Ahmad in az-Zuhd (p.196) and the isnâd is hasan.
The source: http://sunnahonline.com/