Self-flagellation is forbidden (Haram) in Islam. Some great scholars such as Grand Ayatullah Khamenei who is the leader of Islamic Republic of Iran have prohibited any self-mutilation such as self-flagellation with knives or chains and even walking on fire
The above images were made from Imam Khamenei’s saying in 1994:
“Practicing
Tatbir (i.e.self-flagellation) is one of the wrongdoings. I know that
some people would say: “It was better for him not to mention Tatbir.”
They would say: “Why do you bother with Tatbir? Some people do it, let
them do!”. No! it’s not right to remain silent toward such a wrong
action…
It is wrong that some people hold daggers
and hit themselves on the head to bleed. What are they seeking?! How
can this be an act of mourning?! Of course hitting on the head with
one’s hands is a sign of mourning. You have seen it several times that
when people face suffering, they hit on their chests and heads. This is a
typical symbol of mourning. But where have you ever seen a person who
is suffering from the loss of a dear one, hit on their head with a
dagger and make it bleed?! How can this be an act of mourning?
Tatbir is a fabricated tradition. It is
among the issues that does not belong to the religion and undoubtedly
God is not also pleased with such a practice.
The more I thought about it, the more
truly I realized I cannot overlook informing our dear people about
Tatbir which is certainly an act of wrongdoing and a heresy. Do not practice it! I do not approve of it. If someone does something to pretend that they want to
practice Tatbir, I will be truly dissatisfied with them. I am declaring this solemnly.”