Answer: Visiting the graveyard is prescribed and permissible, but singling it out for a particular day — such as going to the graveyard on the day of Eid to make supplication, scattering flowers on the grave, and so on — is an evil innovation and a bad deed. The Muslims of the best generations were unaware of it. They were the ones who loved the Prophet ﷺ the most and who fulfilled the requirements of love for the Messenger. Despite their vast knowledge of the religion, they did not do this, so how did it become part of the religion?
How well Imam Malik bin Anas (may Allah have mercy on him) (93-179 AH) said:
من أحدث فى هذه الأمة اليوم شيئا لم يكن عليه سلفها فقد زعم أن رسول الله صلى الله عليه وسلم خان الرسالة لان الله تعالى يقول: ﴿اليوم أكملت لكم دينكم وأتممت عليكم نعمتي ورضيت لكم الإسلام دينا﴾ ، فما لم يكن يومئذ دينا لا يكون اليوم دينا
“Whoever introduces today something in this Ummah that the predecessors of the Ummah did not follow, by his very state he is saying that the Prophet ﷺ betrayed the trust in conveying the message. Allah says: ﴿الْيَوْمَ أَكْمَلْتُ لَكُمْ دِينَكُمْ وَأَتْمَمْتُ عَلَيْكُمْ نِعْمَتِي وَرَضِيتُ لَكُمُ الْإِسْلَامَ دِينا﴾ ‘Today I have perfected for you your religion, completed My favour upon you, and approved Islam as your religion.’ So whatever was not part of the religion on that day cannot be part of the religion today.”
Allamah Ibn al-Hajj (may Allah have mercy on him) (737 AH) says:
ومن عادته النميمة أنه لا يأمر بترك سنة حتى يعوض لهم عنها شيئا يخيل إليهم أنه قربة ، عوض لهم عن سرعة الأوبة زيارة القبور قبل أن يرجعوا إلى أهليهم يـوم العيد وزين لهم ذالك وأراهم أن زيارة الأقارب من الموتى فى ذالك اليوم من باب البر وزيادة الود لهم وأنه من قوة التفجع عليهم ، إذ فقدهم فى مثل هذا العيد ، وفي زيارة القبور فى غير هذا اليوم من البدع ، والمحرمات ما تقدم ذكره فى زيارة القبور فكيف به فى هذا اليوم الذى فيه النساء يلبسن ويتحلين ابتداء ، ويتجملن فيه بغاية الزينة مع عدم الخروج فكيف بهن فى الخروج فى هذا اليوم فتراهن يوم العيد على القبور متكذفات قد خلعن جلبات الحياء عنهن ، فبدل لهم موضع السنة محرما ومكروها
“It is also one of the devil’s tricks that he does not tell them to abandon a sunnah; rather, he engages them in some other act and puts into their minds that it is an act of reward. The devil played this trick on the people: that on the day of Eid, before returning home, they should visit the graves. He adorned this act with various fancies and supplied them with mental arguments that visiting the graves of one’s relatives on this day is righteousness and an expression of love for them. There is sorrow over their absence on this Eid. People have made the market of innovations and superstitions thrive in connection with graves even on ordinary days. So what will the state be on the day of Eid, when the women wear pleasant clothes and jewellery and go beyond the limits of adornment? They have not even come out for Eid yet; when they come out to visit the graves, you will see them tear apart the veil of modesty at the graves. Thus the devil made them commit a forbidden act in place of the sunnah.”