From Halachot Peskuot min HaGeonim quoted here. And see also my earlier post on Kapparos here
Below is Lauterbach's conclusion regarding the origin of Kapparos. I do not know if there are any more recent studies:
To state briefly what I discuss elsewhere" at greater length, therecan be no doubt that the Kapparot-ceremony, especially as it wasperformed in the earliest gaonic time with a horned animal, ram or goat,13 or with a rooster,1'* was a revival of the ancient ritual of sendinga goat to Azazel.IS And like the goat for Azazel it was a sacrifice toSatan, a sort of ransom or bribe sent to him to persuade him to desistfrom accusing the people whom he would claim as his prey.Such an offering naturally had to be accompanied by some messageor petition addressed to the party for whom the offering was intended.And so indeed it was. An incantation was recited, composed of appro-priate biblical phrases16 suitable to express the thoughts to be con-veyed to Satan and his cohorts, the degraded sons of God, or thefallen angels who had rebelled against the words of God and in pun-ishment for their sins were dwelling in darkness, chained in iron fetters."In this incantation or message, these "dwellers in darkness" weresubtly reminded that they themselves, though sons of God, created" In the work on Tashlik referred to above note 1.