Exodus 21:20

20 “Anyone who beats their male or female slave with a rod must be punished if the slave dies as a direct result,

Exodus 21:20 in Other Translations

KJV
20 And if a man smite his servant, or his maid, with a rod, and he die under his hand; he shall be surely punished.
ESV
20 "When a man strikes his slave, male or female, with a rod and the slave dies under his hand, he shall be avenged.
NLT
20 “If a man beats his male or female slave with a club and the slave dies as a result, the owner must be punished.
MSG
20 "If a slave owner hits a slave, male or female, with a stick and the slave dies on the spot, the slave must be avenged.
CSB
20 "When a man strikes his male or female slave with a rod, and the slave dies under his abuse, the owner must be punished.

Exodus 21:20 Meaning and Commentary

Exodus 21:20

And if a man smite his servant or his maid with a rod
A Canaanitish servant or maid, as the Targum of Jonathan, and so Jarchi; and that only with a rod for the correction of them, and not with a sword or any such destroying weapon, which would seem as though he intended to kill, yet nevertheless:

and he die under his hand;
immediately, while he is smiting or beating him or her, on the same day, as the above Targum interprets it:

he shall be surely punished;
or condemned to the punishment of being slain with the sword, as the said Targum and Jarchi explain it: this law was made to deter masters from using severity and cruelty towards their servants.

Exodus 21:20 In-Context

18 “If people quarrel and one person hits another with a stone or with their fist and the victim does not die but is confined to bed,
19 the one who struck the blow will not be held liable if the other can get up and walk around outside with a staff; however, the guilty party must pay the injured person for any loss of time and see that the victim is completely healed.
20 “Anyone who beats their male or female slave with a rod must be punished if the slave dies as a direct result,
21 but they are not to be punished if the slave recovers after a day or two, since the slave is their property.
22 “If people are fighting and hit a pregnant woman and she gives birth prematurely but there is no serious injury, the offender must be fined whatever the woman’s husband demands and the court allows.
Scripture quoted by permission.  Quotations designated (NIV) are from THE HOLY BIBLE: NEW INTERNATIONAL VERSION®.  NIV®.  Copyright © 1973, 1978, 1984, 2011 by Biblica.  All rights reserved worldwide.