The ritual of the scapegoat is taken from the Old Testament. Each year on the Day of Atonement, the Hebrews would choose 2 goats: one to be sacrificed to the Lord and one to atone for the people's sins. The high priest would lay his hands on the second goat's head and confess all the sins of the people, in essence transferring their sin onto the goat. Then that goat would be led away from the town and left to wander in the wilderness, taking the people's sins with it. See Leviticus 16:7-10.
Note that unlike Jackson's story, the ancient scapegoat was not killed. Many biblical scholars see Christ's death on the cross as a type of scapegoat, in that he took the sins of humanity upon himself when he died, making redemption available to all. It is that type of scapegoat that is portrayed in this story: one person must die for the good of the community.