Malawi's highest court on Wednesday outlawed the death penalty and ordered the re-sentencing of all convicts facing execution.
Capital punishment has long been mandatory in Malawi for prisoners convicted of murder or treason, and optional for rape.
Violent robberies, house break-ins and burglaries could also be punishable by death or life imprisonment.
Executions have however not been carried out since Malawi's first democratically elected president, Bakili Muluzi, opposed the punishment when he took office in 1994.
In a landmark ruling on Wednesday, Supreme Court judges hearing an appeal by a murder convict declared the death penalty "unconstitutional", de facto abolishing the punishment.
"The death penalty... is tainted by the unconstitutionality discussed," the judgement said.
Malawi last executed around two dozen prisoners in 1992, according to Amnesty International.
More than 30 countries in Africa still have the death penalty on their books, but just under half have carried out executions in recent years.