Deuteronomy 21:22-23
If a man has committed a sin worthy of death, and he is executed, and you hang his body on a tree, you must not leave the body on the tree overnight, but you must be sure to bury him that day, because anyone who is hung on a tree is under God’s curse. You must not defile the land that the LORD your God is giving you as an inheritance.
Berean Standard Bible, public domain. Read all of Deuteronomy 21
One song meets this passage
“Where they strung up a man, they say, who murdered three”
The Hanging Tree (Rebel Remix) [From "The Hunger Games: Mockingjay, Pt. 1"] [feat. Jennifer Lawrence] [feat. Jennifer Lawrence] · James Newton Howard
strains against Deuteronomy 21:22-23
The hanging tree in Scripture marks shame and curse, not the strange allure the song gives it; here death is aestheticized rather than mourned.