The meaning of the words “May Allah curse the one who slaughters an animal for the sake of anyone other than Allah”
Question

The Prophet (blessings and peace of Allah be upon him) said: “May Allah curse the one who slaughters an animal for the sake of anyone other than Allah.” What is meant by that? Does slaughtering an animal to feed a guest come under the heading of slaughtering for the sake of anyone other than Allah?
Praise be to Allah.What is referred to in the hadith is the prohibition on slaughtering an animal for the sake of those of the Prophets and awliya’ (close friends of Allah) who have died, hoping for their blessing (barakah), and slaughtering an animal for the sake of the jinn in order to placate them and in the hope that they will meet one’s needs, or to ward off their evil. That is because such actions constitute major shirk, and the one who does that is deserving of Allah’s curse and wrath.
As for slaughtering an animal in order to feed guests by way of honouring them, or for one’s family in order to be generous towards them, or slaughtering an animal as an act of worship in order to draw closer to Allah, and as an act of charity on behalf of the dead in the hope that Allah will grant the reward of that to the living and the dead, this is permissible. In fact, it comes under the heading of a good deed for which there is hope of reward from Allah. The same applies to offering sacrifices on the Day of Sacrifice on behalf of the dead and the living.
And Allah is the source of strength. May Allah send blessings and peace upon our Prophet Muhammad and his family and companions. End quote.
Shaykh ‘Abd al-‘Azeez ibn ‘Abdillah ibn Baaz, Shaykh ‘Abd ar-Razzaaq ‘Afeefi, Shaykh ‘Abdullah ibn Ghadyaan, Shaykh ‘Abdullah ibn Qa‘ood
Fataawa al-Lajnah ad-Daa’imah (1/196).
It also says in Fataawa al-Lajnah ad-Daa’imah (1/225):
It is permissible to slaughter an animal [to feed] a guest and to say Bismillah over it when slaughtering it. That is not included in the general meaning of the verse (interpretation of the meaning), {and that which has been dedicated to other than Allah} [al-Maa’idah 5:3]. Rather what is referred to in the verse is that which is sacrificed to anyone other than Allah, such as a sacrifice offered to the dead and the like, for the purpose of drawing closer to them. As for slaughtering an animal for a guest, the purpose behind that is to honour him, not to worship him, because the Prophet (blessings and peace of Allah be upon him) instructed us to honour guests.
And Allah is the source of strength. May Allah send blessings and peace upon our Prophet Muhammad and his family and companions. End quote.
Shaykh ‘Abd al-‘Azeez ibn ‘Abdillah ibn Baaz, Shaykh ‘Abd ar-Razzaaq ‘Afeefi, Shaykh ‘Abdullah ibn Ghadyaan, Shaykh ‘Abdullah ibn Qa‘ood
For more information, please see the answer to question no. 44730 .
And Allah knows best.