Sort of …
Deuteronomy 21:
18 “If any man has a stubborn and rebellious son who will not obey his father or his mother,and when they chastise him, he will not even listen to them, 19 then his father and mother shall seize him, and bring him out to the elders of his city at the gateway of his hometown. 20 They shall say to the elders of his city, ‘This son of ours is stubborn and rebellious, he will not obeyus, he is a glutton and a drunkard.’ 21 Then all the men of his city shall stone him to death; so you shall remove the evil from your midst, and all Israel will hear of it and fear.
22 “If a man has committed a sin worthy of death and he is put to death, and you hang him on a tree, 23 his corpse shall not hang all night on the tree, but you shall surely bury him on the same day (for he who is hanged is accursed of God), so that you do not defile your land which the LORD your God gives you as an inheritance.
Verses 18-21 are an example of a Law of God that requires someone to be put to death … the explicit manner of execution is specified as stoning (not hanging).
Verses 22-23 place restrictions on MEN choosing to put someone to death by hanging. Verse 22 specifically states “and
you hang him on a tree” (a choice of men, not a command of God). Verse 23
prohibits the corpse from hanging on the tree all night “so that you do not defile your land”. This seems more about protecting the people doing the hanging.
This is not a Law of God that requires a hanging.