The two workers on Jan 29 hunted down and used machetes to attack the orangutan which frequented the palm oil plantation where they were working in the town of Lahad Datu, said Laurentius Ambu, Sabah state wildlife director.
The 16-year-old male orangutan died a few days later due to severe multiple wounds, Mr Ambu added.
"This should serve as lesson to those who do harm to our wildlife," he said. "We will punish them to the fullest extent of the law."
The pair said they attacked the orangutan in revenge for damage it did to the plantation.
According to a witness, they also attacked it because they wanted to eat its meat.
Lahad Datu sessions court Judge M Rajalinggam handed down the verdict on the case on Wednesday after the two workers pleaded guilty to the crime.
Conservationists estimated the number of orangutans in Sabah at 11,000 and the number continues to decline due to degradation of forests in the area.