The Prophet, peace be upon him, forbade the slaughtering of animals at graves, which was practiced in the Days of Ignorance out of arrogance and self conceit in order to flaunt one’s wealth. Anas reported: “The Prophet, peace be upon him, said: ‘There is no slaughtering (of animals on graves) in Islam.” (Abu Daw’ud) Abdul Razzaq said: “They used to slaughter a cow or a sheep by the grave.”
Al-Khattabi said: “During the Days of Ignorance the people used to slaughter camels by the graves of generous people. They used to say: ‘We would like him to be rewarded for his deeds. He used to slaughter them when he was alive and feed them to his guests. We slaughter these camels at his grave to feed the lions and birds, so that he may continue feeding others even after his death as he used to do while he was alive’.” A poet said: I slaughtered my she-camel at the grave of my king, with a bright sharp sword, meticulously cleaned by polishers, on the grave of someone, who, had I died before him, would have willingly slaughtered his mounts by my grave.
They believed in resurrection after death. Some people believed that if a camel was slaughtered by the grave of a person, he would be restored to life mounted on it on the Day of Resurrection, whereas otherwise at his resurrection, having no mount, he would have to walk on foot.