Riyad as-SalihinChapter 17Hadith 937
Full Sharh — Riyad as-Salihin 937
وعن أبي هريرة رضي الله عنه قال: سمعت رسول الله صلى الله عليه وسلم يقول: " قال الله تعالى: أنا أغنى الشركاء عن الشرك، من عمل عملا أشرك فيه معي غيري، تركته وشركه" ((رواه مسلم)).
English Translation
Abu Hurairah (May Allah be pleased with him) said:: The Messenger of Allah (ﷺ) said, "Almighty Allah says, 'I am the One Who is most free from want of partners. He who does a thing for the sake of someone else beside Me, I discard him and his polytheism..".
Source
Riyad as-Salihin(رياض الصالحين)
The Book of the Prohibited actions
Hadith Number
937