RoboCop?
Stir of Echoes (? - been a while since I’ve seen it).
ETA- Oops. Misread the OP.
Was it? I don’t know much about the early Danish legal system, but it could be argued that Hamlet’s father asking his son, and possible hier and successor to the throne, to avenge his death was seeking legal redress posthumously.
It’s not a book or movie, but in the video game Phoenix Wright, the second case has you defending a girl named Maya, who is the suspect in the murder of her sister. Maya happens to be talented at contacting the dead, and just as the trial seems lost, she channels her dead sister, whom gives you just the tip needed to nail the real murderer right there in court.
Any insurance lawyer worth his salt could get benefits denied in that case, as being tantamount to breaching the policy’s suicide clause, just for starters.
And don’t insurance policies not cover execution anyway?
Isn’t there usually a time limit on the suicide clause?
Probably. There’s also a general common-law rule against profiting by one’s own wrongful act – e.g., if you make a will designating me sole beneficiary and I kill you, I can’t inherit your estate, no matter what the will says; and the situation described almost certainly would come under that.