Nirmala, who was then 19, suffered severe burns and bruises over much of her body after Yim repeatedly pressed a hot iron on her back and breasts and scalded her with boiling water in the worst-ever case of maid abuse reported in the country.
Rejecting Yim's defence that the injuries were self-inflicted, the judge said he wanted to impose a "deterrent sentence" to show that "sadistic behaviour cannot be tolerated in civil society".
"This will serve as a deterrent to future cases"
Eka Suripto, Indonesian diplomat in Kuala Lumpur
Jagjit Singh, Yim's lawyer, said he would appeal against the sentence which he described as "excessive" because there was "no loss of life, no disfigurement, no scars".
The case sparked national outrage that focused attention on the plight of migrant domestic workers following photographs published in Malaysian newspapers in 2004 of Nirmala's injuries.
Nirmala said she was beaten and burned for mistakes she made during her five months in Yim's home.
She said that on one occasion her employer took a hot iron and pressed it against her breasts after complaining that clothes had not been properly ironed.
Nirmala has since left Malaysia.
|Abuse of Indonesian maids in Malaysia have sparked protests in Jakarta [EPA]
Indonesia, which has asked Malaysia to do more to protect its workers in the country, said it was pleased with the ruling.
"This will serve as a deterrent to future cases," said Eka Suripto, an Indonesian diplomat in Kuala Lumpur.
Indonesian diplomats say at least 1,500 maids seek help at their offices across Malaysia each year, most of them complaining of unpaid wages but some reporting physical abuse.
Nirmala's plight even drew the attention of Susilo Bambang Yudhoyono, the Indonesian president, and led to street protests outside the Malaysian embassy in Jakarta.
Malaysia is home to up to two million foreign workers, mostly Indonesians who often take up jobs as domestic helpers, construction workers and plantation labourers.