Whipping boy wouldn't be an appropriate term of a situation like murder.
Because in some cases, a poor boy would like to serve as a scapegoat for the murder committed by a rich man. Not that the poor boy wants to die; I believe he is sacrificing himself to get his family out of poverty.
This sounds like a plot from the Oscar nominated anthology film, Wild Tales
Stooge or fall guy might be a better term to describe someone taking the fall for a particular crime like murder.
Stooge as a noun in Oxford: 1)derogatory A subordinate used by another to do unpleasant routine work: party stooges put there to do a job on behalf of central office.
Since it is a routine work, is it suitable here?
2)A performer whose act involves being the butt of a comedian’s jokes:
the stooge is offstage
This definition failed to meet the requirement here.
Fall guy :
(Oxford) informal , chiefly North American
he contends that he is innocent, that he was set up as a fall guy
It's better but informal.
(Non-Oxford): fall guy
a person who is gullible and easy to take advantage of.