Allah declares His complete independence from any partner, and then draws the consequence for our worship: whoever performs a deed in which he associates another with Allah, Allah leaves him to that other, and wants no part of the deed. The One in need of nothing does not accept a divided heart.
Where this hadith comes from
This is a hadith qudsi: the Prophet (peace be upon him) reports the very words of Allah, words not part of the Qur'an itself. Allah declares, "I am so self-sufficient that I am in no need of having an associate," and then He draws the consequence: whoever does a deed partly for someone else's sake will have that whole deed left to the one he associated.
It is narrated by Abu Hurayrah (may Allah be pleased with him) and recorded by Muslim, and it is graded sahih. It sits in the lane of sincerity (ikhlas) and the heart's hidden disease of showing off (riya), close to the first hadith of an-Nawawi's forty, that deeds are judged by their intentions.
The key words
What it means, line by line
"I am so self-sufficient that I am in no need of having an associate." Allah is the One who needs nothing, so He does not accept worship that is shared with another aim. A divided deed is of no use to the One who is rich beyond all need.
"He who does an action for someone else's sake as well as Mine will have that action renounced by Me to him whom he associated with Me." The point is not that the reward shrinks; the deed is handed over entirely to the other party it was performed for. So worship done to be seen is returned to sender, and the verse names the cure: do the deed for Allah, and associate no one with Him in it.
He needs no co-owner
Because Allah is utterly self-sufficient, He does not accept worship shared with another motive. When a person prays, gives, or recites partly for Allah and partly to be seen, Allah, in His richness, simply withdraws and leaves the whole deed to the other party it was aimed at. The showing-off does not earn a smaller reward; it forfeits the deed.
Sincerity is the price of admission
This is the warning side of the first hadith of an-Nawawi's forty: deeds are by intention. Here we learn what happens when the intention is mixed, the deed is returned to sender. So sincerity (ikhlas) is not optional polish; it is the very thing that makes a deed acceptable. The Qur'an names it as the entire point of worship: to be sincere to Allah in religion.
Carry this with you
Hand Allah a deed with no one else's name on it.
He accepts no co-owner.
The Self-Sufficient does not take worship shared with another motive.
Riya forfeits the deed.
Showing off does not shrink the reward; it returns the whole deed to the one it was aimed at.
Sincerity is the price of admission.
Ikhlas is not polish; it is what makes a deed acceptable at all.
Hide some good.
Cultivate deeds no one sees, to keep the heart trained on Allah alone.
A du'a to carry
رَبَّنَآ ءَاتِنَا فِى ٱلدُّنْيَا حَسَنَةً وَفِى ٱلْءَاخِرَةِ حَسَنَةً وَقِنَا عَذَابَ ٱلنَّارِ
Rabbana atina fid-dunya hasanatan wa fil-akhirati hasanatan wa qina 'adhab an-nar
Our Lord, give us in this world good and in the Hereafter good, and protect us from the punishment of the Fire. (Al-Baqarah 2:201)
A du'a for a sincere deed
Allah needs nothing from us, and so He will not share our worship with our vanity. He asks only that what we bring Him be truly His.
O Allah, You are free of all need of partners. Purify our deeds of every motive but Yours, and accept from us what we do for Your face alone. Give us good here and good in the Hereafter, and save us from the Fire. Ameen.
The hadith qudsi is from sunnah.com: 'I am so self-sufficient that I am in no need of having a partner...' narrated by Abu Hurayrah (ra), recorded by Muslim, graded sahih. The supporting Qur'an (98:5) is in Uthmani script verified via quran.ai (ar-uthmani-minimal) with the Saheeh International translation. Per the editorial policy this stays with the spiritual meaning (sincerity and avoiding riya). FOR SCHOLAR REVIEW before publication.