From Slate: Self-flagellation is a major part of the Muslim holiday, the Day of Ashura.
A subset of male Shiites injure themselves on Ashura to represent their grief over the martyrdom of Hussein, grandson of the prophet, at the hands of the Ummayad army in 680. These people engage in violent rituals such as pounding their chests with their fists, lacerating their scalps with a knife or machete, or self-flagellation with a zanjeer—five blades connected to a wooden handle by steel chain. But none of these forms of expression is sanctioned by mainstream religious authorities; most prominent Shiite clerics object to all forms of self-mutilation, since it has no basis in early religious history and appears barbaric to outsiders.
The parallels between self-inflicted ordeals in Islam and in Christianity are striking, as the practice persists in spite of what leaders say and the lack of any scriptural support. Prominent Muslim clerics have issues fatwas condemning the practices, that they reflect badly on the faith and harm the body.