Defaming a Muslim is legally prohibited due to the great evils and harmful consequences that result from such action. It is also prohibited for a person to defame himself, regardless of the truth or falsehood of the information, in any context other than in front of a judge; concealing, even in front of a judge, is still more recommended.
Defaming others could be based on true or false information; in the first case it is a crime of defaming and disgracing; in the second, it is a multiple crime of defaming, lying and injustice. In Sharia, there some well-known cases excluded: A victim of injustice speaking against his oppressor, in case of seeking fatwa, seeking help to stop or forbid wrong, warning people of evils of some one, …etc.
Defaming crime is worse when the defamed is a public figure such as a ruler or a scholar.
Judge has the right to use defaming as a punishment in some cases such as false testimony, feigning knowledge, and he must use it in performing “hudoud”(penalties imposed by Sharia) such as those of adultery, slandering with adultery (qadhf).
In conclusion, defaming is a dangerous and epidemic malady that causes lot of evils and damages to spread in the society and destroy every thing. Ibn Abd Al-Barr was true when he said: “ This evil needs a separate whole book.”