The curse of one hung on a tree
Paul quotes Deuteronomy's words about a person hung on a tree. He says that Christ became a curse to redeem people from the law's curse.
Christ redeemed us from the curse of the law by becoming a curse for us. For it is written: “Cursed is everyone who is hung on a tree.” He redeemed us in order that the blessing promised to Abraham would come to the Gentiles in Christ Jesus, so that by faith we might receive the promise of the Spirit.
Deuteronomy 21:22-23 says that anyone hung on a tree is under God's curse. Galatians 3:13 introduces these words with, "For it is written," and applies them to Christ.