This Article Contains Spoilers - WARNING: This article contains major spoilers. If you do not wish to know vital information on plot / character elements in a story, you may not wish to read beyond this warning: We hold no responsibility for any negative effects these facts may have on your enjoyment of said media should you continue. That is all.
Walter Tschanz is the antagonist in the novel The Judge and His Hangman (German: Der Richter und sein Henker) by Friedrich Dürrenmatt.
Tschanz was a police officer in the Swiss town Bern. Being always the unsuccessful one, he grew envy of his superior, Commissar Schmied and everything he had: rich parents, good schools, beautiful wife Anna, simply lucky life. Envious Tschanz started spying on Schmied and thus discovered many details about his rival's life. After some time, however, he couldn't stand Schmied anymore and took courage to commit a murder. One night, he stopped Schmied's car and shot him dead.
The police immediately started solving the crime and the case devolved to Commissar Bärlach, with Tschanz as his assistant. This put Tschnaz into risky situation - he had to turn Bärlach's attention away from the real murderer and find a fitting scapegoat.
Further, Tschanz's obsession with Schmied's lucky life led him to attempt to replace his superior in this world. Tschanz got the same dress as his victim, bought his car and started dating Anna.
However, this all only caused Bärloch to suspect Tschanz from the beginning. Tschanz became suspicious about the Commissar as well and did everything to sidetrack him. He blamed Gastmann, a criminal mastermind and Bärloch's old enemy who was suspicious to all anyway, for the murder. When it visibly didn't work, he burgled into Bärloch's house and even threw a knife at him. The Comissar recognized him, but didn't tell a word.
Bärloch actually manipulated with Tschanz, leading him to go and murder Gastmann and his two servants, and therefore he fulfilled Bärloch's secret wish to finish his old opponent. Tschanz is shot as well and left his handgun as if it belonged to one of the servants. Then he called police and claimed them he had been attacked by Gastmann's men who had shot first. After the police discovered "the servant's gun" was the same the one Schmied had been killed with, no one ever doubted Gastmann didn't kill Schmied.
That evening, Bärloch invited Tschanz to celebrate his success in the case. However, the Commissar's strange behavior - eating plenty of food despite of stomach cancer - led Tschanz to realize Bärloch knew the real murderer. Bärloch then explained it was actually Tschanz himself who unwillingly revealed the murderer. Except all his visible attempts to get Schmied's life, Tschanz simply knew too much details about the murder he couldn't know. Also, when Bärloch had been attacked by a mad dog during the investigation and Tschanz had shot the animal, the bullet was the same as the one found in Schmied's body... and it belonged to "the servant's gun".
Realizing Bärloch was the judge who led Tschanz as his hangman to kill his old enemy, Tschanz thought about killing Bärloch at first. However, Bärloch told him to leave, as he didn't want adjudge another man.
Tschanz obeyed and left Bärloch's house. Soon after, he was killed by a train which hit his car.