Incidentally, the ancient Greeks ritually practiced scapegoating by blaming some calamity and the like on a powerless person or outcast (a pharmakós) and most unfairly and tragically driving the person out of the community by force. However, the term as we know it today comes from the Pentateuch (the Hebrew Bible), specifically, the third book known as the Book of Leviticus where the directive is for an actual goat to be sent into the desert, symbolically carrying with it the sins of the community (the Israelites). Here is the relevant passage:
16:7 Then he is to take the two goats and present them before the LORD at the entrance to the tent of meeting.
16:8 He is to cast lots for the two goats—one lot for the LORD and the other for the scapegoat.
16:9 Aaron shall bring the goat whose lot falls to the LORD and sacrifice it for a sin offering.
16:10 But the goat chosen by lot as the scapegoat shall be presented alive before the LORD to be used for making atonement by sending it into the wilderness as a scapegoat.