The Holy verse says:
"So they set out, until when they met a boy, al-Khidhr killed him. [Moses] said, "Have you killed a pure soul for other than [having killed] a soul? You have certainly done a deplorable thing." (18:74)
What's the story ?
This chapter (surah) is called the cave. The main idea in this chapter is, as the name indicates, is that things may look bad but inside they may have mercy. It shows that our vision is limited by our knowledge, only God knows the reality of things because He is the Most knowing.
The chapter starts with the story of People of the Cave (Ashabu Al-Kahf). Some number of young believers lived in a time where they were persecuted for their beliefs. Upon the guidance of their Lord, they fled the city together where believers were prosecuted, and took refuge in a cave where they fell asleep. According to the Quran, they slept for 309 years. When they woke up, they found that the people of city have become believers. Although it is difficult to believe that an abandoned cave that gives the impression of darkness and fear can act as a safe shelter for the young believers.
Another story, the one we will focus on is the story of Moses with Al-Khidr, peace and blessings be upon both of them. The story starts with Moses, being ordered by God to search for a very knowledgable man to learn from him. Moses was told the exact location where he will find that man. When the two men met, Moses asked Al-Khidr to teach him. AL-Khidr told him that it would be difficult for Moses to be patient with him as Moses did not have the knowledge to understand the motive behind every act that Al-Khidr would do. Moses insisted and they both set on a wonderful journey where Al-Khider would do certain acts, but Moses, not understanding the reasons behind them, was always objecting to these deeds that seemed to Moses not understandable or even unacceptable. At the end of the story, Al-khidr explained every action to reveal the truth to Moses. From the story we learn that sometimes we see things that we regard as bad or even destructive, but in reality they prove to be an act of mercy from a knowing wise God.
The main point in the story we need to discuss here is the part concerned with killing a boy. Al-khidr killed a boy, Moses was so furious as, from his point of view, he killed the boy for no reason. Later in the story Al-Khidr reveals why he killed the boy.
The verses telling this part of the story says:"So they set out, until when they met a boy, al-Khidhr killed him. [Moses] said, "Have you killed a pure soul for other than [having killed] a soul? You have certainly done a deplorable thing." (18:74) Later in the story Al-Khidr explained the reason by saying : "And as for the boy, his parents were believers, and we feared that he would overburden them by transgression and disbelief. So we intended that their Lord should substitute for them one better than him in purity and nearer to mercy." (18:80-81)
Later Al-Khidr says: "And I did it not of my own accord. That is the interpretation of that about which you could not have patience." (18:82)
Where is the problem here?
Some people claim that the verse (18:74) is a call for violence and that it gives an example and hence justifies honor killings in which a family member is murdered because they brought shame to the family, either through apostasy or perceived moral indiscretion. Prejudiced to a funny level as the accusation may seem, we are going to answer it.
What does the story represent
The story in the verse is a historical account of an incident that happened. It is not like a general rule in Islam that people can go around and kill others for their moral indiscretion. The verse is telling a story that happened in the past to convey a certain concept which is simply "Bad things can happen to good people but this bad thing can have a good cause hidden inside it".
Killing is not acceptable in any religion, it is not acceptable in Islam and it was not accepted by Moses himself that's why he was furious when al-Khidr killed the boy. So trying to imply that the story is mentioned to represent a general Islamic role is actually stupidly prejudiced.
Besides what does that story has to do with justifying honor killing of someone. In case those who are trying desperately to link this story to honor killing must have missed the simple fact that Al-Khidr was not, in any way, related to the boy. He didn't kill him because he was bad or else we would have seen Al-Khidr and others like him killing all bad people in the whole world. The boy died because it was his time to die. Al-Khidr here was like the angel of death here. It has nothing to do with honor killing.
Killing is FORBIDDEN in Islam under ANY condition. The only condition when you are allowed to kill is when you are defending yourself. This applies to a person or a whole nation. If your country is under attack then you defend it, if you are under attack and your life is threatened then you have the right to defend yourself. The so called " Honor killing" meaning killing someone because of his moral indiscretion is NOT ALLOWED in Islam.
Who is Al-Khidr?
Actually Al-Khidr is one of Gods' servants who we know very little information about. Some Islamic scholars consider him a messenger of God, others consider him an angel. The thing we know for sure is that he never did a thing without being ordered by God. He did not kill the boy because he wanted to, he killed the boy because he was ordered by God to do that.
In another verse God explains the role played by Al-Khidr saying: "And they found a servant from among Our servants to whom we had given mercy from us and had taught him from Us a [certain] knowledge." (18:65). In the boy's case, Al-khidr acted like the angel of death. Imagine you are walking beside the angel of death and watching him taking lives, you will be angry because what your eyes see is him killing people, but the reality of things is that death is important for the continuity of life. Imagine a life where we all go on living without dying, how can the coming generations survive or eat or even walk. So death, gloomy as that may seem, is essential for life to continue.
In this part of the story Al-Khidr acted like the angel of death. He is not any usual person doing this, he is someone ordered by God to do that. This is a characteristic of Al-Khidr alone. NOONE can repeat this act claiming that God told him.
The whole story is about good outcome from a seemingly bad situation. What we are supposed to learn from the story is never to be frustrated if something bad happens to you, if you are good and have awaken conscience then definitely God will bring you a good outcome and will reward you for your patience. The verse is a call for hope and understanding that bad things can happen to good people, but do not be frustrated because our knowledge is limited, maybe the thing you consider as bad today may turn out to have a positive impact on your life later. The verse is a call for facing your problems with hope and trust in a fair and merciful God that He is there for you and will help you overcome your problems.
Where is the violence here? How can such a noble call be wickedly twisted to mean exactly the opposite? The only answer I have is the Holy verse "So have they not traveled through the earth and have hearts by which to reason and ears by which to hear? For indeed, it is not eyes that are blinded, but blinded are the hearts which are within the breasts." (22:46)