All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah and that Muhammad is His slave and Messenger.
It is prohibited for a grandfather to kill his grandson, his son’s or daughter’s child, just as it is forbidden for any Muslim to kill deliberately; the sin is the same in both cases. It is enough evidence on the prohibition of murder in Islam to ponder over the verse that reads (what means): {But whoever kills a believer intentionally – his recompense is Hellfire, wherein he will abide eternally, and Allaah has become angry with him and has cursed him and has prepared for him a great punishment.} [Quran 4:93]
However, most scholars maintained that the grandfather is like the father; he is not to be killed in retaliation for killing his grandchild from his son or daughter because paternity is a valid impediment to the application of hadd (the corporal punishment determined by Islamic Law) in this case (i.e. exempting the father and grandfather from the Hadd).
Al-Haawi reads, "The grandfather is not to be killed on account of killing his grandson."
Ad-Durr Al-Mukhtaar reads, "A grandfather is not to be killed in legal retribution regardless of how distant they are in generation or whether they are the grandchildren from the sons or the daughters; and the same ruling applies to grandmothers as well..."
Ibn Qudaamah wrote, "The same ruling applies to the parent and grandparent up to all levels, whether on the mother’s side or the father’s according to most of the scholars who held that a father is exempted from legal retribution (for killing his own son)." [Al-Mughni]
Allaah knows best.