This term, for one who is punished for the misdeeds of others, is the result of a mistranslation. The term was coined in 1530 by William Tyndale, who misread the Hebrew word 'azazel, the proper name of Canaanite demon, as 'ez ozel, literally the goat that departs. In Leviticus 16:8, the scriptures describe how two goats should be prepared for an offering, lots should be drawn, and one should be sacrificed to the Lord as a sin-offering, and the other given to Azazel and set free in the wilderness bearing the sins of the people.
To be fair to Tyndale, he was not the only one to make this error. The Septuagint, a Greek translation of the Old Testament, uses tragos apopompaios, or the goat that is sent out. The Vulgate Bible refers to the second goat as a caper emissarius, or the emissary goat. Coverdale's 1535 Bible refers to it as a free goat. But it was Tyndale who coined the term scapegoat, or scapegoote as he spelled it. The King James Version retains Tyndale's scapegoat, but most modern translations have corrected the error and refer to Azazel.
It was not until 1824 that the word acquired its current, wider sense. All prior usages have been in terms of the Leviticus passage. The verb form appeared in 1943.
(Sources: Oxford English Dictionary, 2nd Edition; Merriam-Webster Online; Carver's History of English In Its Own Words)