The Hebrew is difficult to understand. It does not necessarily refer to someone being impaled; it could also be that he is hit/beaten with a beam of wooden taken from his house. The key idea being conveyed is that anyone who opposed this edict will be killed. It was common for ancient Near Eastern treaties and royal decrees to end with a curse or a clause threatening punishment for disobedience.1
11 Also I make a decree that if anyone alters this edict, a beam shall be pulled out of his house, and he shall be impaled on it, and his house shall be made a dunghill.