The pasuk says וכי יהיה באיש חטא משפט מות והומת ותלית אתו על עץ, if a man committed a sin whose judgement is death, he should be put to death, and you should hang him on gallows. In the hesped R' Shmuel Yehuda Katzenallenbogen (1521-1597) gave for the tzadik R' Zalman Katz, he explained this pasuk in a different way. We know the title איש is an expression of importance.
So וכי יהיה באיש חטא משפט מות והומת ותלית אתו על עץ: when you see a person of importance and there seems to be missing a reason that he should die. Why did he die? For one of two reasons: Either והומת, others killed him, meaning Hashem brings atonement to the generation through the death of a tzadik and so he was killed because of the sins of other people. Or ותלית אתו על עץ, hinge it on the sin of eitz hadaas, like the gemara says that four people died only as a result of the counsel of the nachash, meaning they were without sin and died only because the nachash incited Chava to violate Hashem’s command, thus bringing death to the world.
Interestingly, the trop on the word באיש is called a munach revii. This can also be a reference to the four (revii means four) who passed away (munach can mean to pass away like we see in the gemara’s phraseology of a person passing away, nach nafshei) as a result of the first sin. The four are Binyomin the son of Yaakov, Amram, Yishai and Kilav the son of Dovid. Incidentally, the gematria of these four, עמרם, כלאב, ישי, בנימן (the majority of the time the name Binyomin is written without the second vuv — see Sota 36b) is 875, the same as משפט מות, the words in Devarim 21:22 (R' Tzvi Zimmerman).