The court ruling came late Thursday on public interest litigations by human rights groups who highlighted examples of women being publicly whipped for adultery, having a child out of wedlock or even talking to people of other faiths.
In some cases, rape victims were flogged for being a "participant" to their assault. The ruling provides jail terms for clerics or any members of village courts who order such punishments by invoking Islamic sharia law.
The same bench on 24 May ordered the government to explain why extrajudicial punishment in the name of fatwa and Islamic Sharia law would not be declared illegal and inhuman.
It also demanded an explanation from the government as to why the educational institutions should not be directed to include texts that will discourage such kinds of punishment.
The High Court on Thursday gave the verdict after hearing arguments on all the three petitions simultaneously.
Sara Hossain, who argued for the petitioners at the hearing, said beating and lashing amount to violations of the constitution.
A Bengali-language daily published a report on 22 May that four people were arrested after a young girl at Bancharampur in Brahmanbaria district was lashed 101 times.