Paul bases his statement on Deuteronomy 21:23, which says, …he who is hanged is accursed of God. Those instructions concern the requirement to bury a hanged man on the same day as his execution because he has been cursed by God. To leave an accursed thing hanging would defile the land. Now, Paul applies this to Jesus Christ, recognizing that because Jesus was hanged on a tree, He was cursed.
Think about Him crying out with a loud voice, saying, Eli, Eli, lama sabachthani? that is, My God, My God, why have You forsaken Me? Well, He knew why. He became a curse, not because of something He had done, but because of what we have done.
This refers to Christ on the tree, which is when and where He bore our sins, as we saw. The Father laid on Christ the iniquity of us all (Isaiah 53:6), just as the high priest laid the iniquities of Israel on the azazel. And Paul says Jesus became a curse. He does not say that Jesus is accursed in the present, because the curse of the law was fulfilled when Christ died. He was then raised up, and the next time He appears, it will be apart from sin, as it says in Hebrews 9:28 - apart from what He took on and became. In the present, He is blessed (Romans 1:25; 9:5; I Timothy 6:15). Yet Paul declares that Christ became a curse for us. He fulfilled the awful, shameful role of the azazel, as only He could.
This is how sins are removed - through Jesus Christ becoming sin and being separated from the Father for what must have seemed like eternity. Like the first goat, His sacrifice opened the way into the Holy of Holies. His sinless blood has given us access to and satisfied the Most High God. Like the second goat, Jesus also bore our sins. Through piercing, bruising, and wounding while hanging on a tree for hours outside the gate, our transgressions are removed as far as east is from the west (Psalm 103:12).