Willem Oosthuizen and Theo Jackson appeared in the Middelburg Magistrates Court on Thursday.
Magistrate Jongilizwe Dumehleli says the motive was very clear.
The pair allegedly beat up Rethabile Mlotshwa, whom they'd accused of trespassing, before forcing him into a coffin while also threatening to set him alight.
Dumehleli says the incident was clearly racially motivated.