Actually, they hanged Jesus, then slew Him, but Peter reverses the order, showing the awful historic link.
For the first time, but not for the last, the Jewish nation deliberately put a Gentile king under the curse of God by hanging his body posthumously on a tree. “And the king of Ai he hanged on a tree until evening” (Jos 8:29). Their law declared: “If a man has committed a sin deserving of death, and he is put to death, and you hang him on a tree, his body shall not remain overnight on the tree, but you shall surely bury him that day…for he who is hanged is accursed of God” (Deut 21:22-23). As was done to Ai’s king, so the same thing occurred later to the five kings of the southern confederacy (see Jos 10:23-27). So six Gentile kings hanged on trees. The centuries roll by. The divided kingdom collapses, first Israel, then Judah before the Babylonians. The penultimate of Judah’s kings is so wicked that God says of him, “Write this man down as childless…for none of his descendants shall prosper, sitting on the throne of David, and ruling anymore in Judah” (Jer 22:30). But then, by the miracle of virgin conception, a Prince is born in the royal family of Judah. He is Israel’s only hope for a rightful king. And they say? “‘Away with Him! Crucify Him!’ Pilate said to them, ‘Shall I crucify your King?’ The chief priests answered, ‘We have no king but Caesar!’” (Jn 19:15). What does “crucify” mean? Hang Him on a tree! Peter notes the irony: “The God of our fathers raised up Jesus whom ye slew and hanged on a tree” (Acts 5:30, KJV). Then Paul uncovers the shocking secret: “Christ has redeemed us from the curse of the law, having become a curse for us (for it is written, ‘Cursed is everyone who hangs on a tree’)” (Gal 3:13). Isaac Watts asks the question; we all know the answer: “Did ever such love and sorrow meet, Or thorns compose so rich a crown?”