The Wehrmacht soldier Rudi Kleinschmidt is having a bad day.
It's the final days of WW2, but because he has bought two tins of Scho-ka-kola (military-issued cola chocolate) off some black marketeers, he is put in front of a military tribunal, which is presided over by the rabidly Nazi military judge Dr Wilhelm Schramm. Because the judge considers him to be a traitor for tampering with army rations, he immediately sentences him to death by firing squad.
However, the execution is cut short by a strafing allied warplane, and Dr Schramm and the firing squad flee, leaving Rudi behind unharmed. Before he runs off as well, he find his own death warrant, pre-emptively signed and stamped by Schramm, and takes it with him.
Fourteen years later, Rudi struggles in post-war Germany by working as a poverty-stricken peddler, selling magic card games and ties. He hitches a ride to Hamburg, but gets off earlier on the way, deciding to stay in a particular town for a while to meet an old girlfriend of his who works as a landlady. During one of his street sales, he noticed a particularly familiar man standing in the onlooking crowd.
It's Dr Schramm, the man who had sentenced him to death back in 1945. He had evaded the de-nazification process after the war by lying about his role as a military judge, and has risen in the meantime to the highly-esteemed profession of chief prosecutor at the city court. However, Schramm himself is still every inch the Nazi he was in the war, living off the fortune and the reputation garnered in WW2, helping fellow ex-Nazis and antisemites evade or escape prosecution, leading his family and household with fascist zeal, reading the Soldatenzeitung (the newspaper for those disconcerted with the fall of the Third Reich), calling foreign music "nigger music", and generally raving about the 'good old times'.
Schramm himself, on the other hand, doesn't immediately recognise Rudi, and painstakingly tries to find out who he is and why he is on his case. Then he sees a tin of Scho-ka-kola, and suddenly remembers everything. Vehemently, he tries to get the peddler off his back, knowing fully well what would happen to him and his career, should the truth ever be revealed. First, he tries to drive Rudi out of town by ruining his business and having his commercial license revoked, using his influence over the police chief.
Rudi then tries to make the existence of the death warrant public by taking his complaint to three sleazy, cowardly and opportunistic acquaintances, who all end up exploiting the situation to their own ends. One, a salesman, first raves about the insolence of the prosecutor, but buckles, as Schramm's wife is too dear a customer of his. The other one, an accountant, ends up writing a letter of protestation to Schramm's superior, but gets cold feet at the notion of making enemies, and scraps it. The third one, a contractor, travels to Schramm and actually confronts him about the charges, but then proposes to keep quiet in return for some certain personal favours.
Rudi is close to giving up on Schramm, and thinks about leaving town. Then he walks by a sweets shop window, and sees Scho-ka-kola on offer. In a fit of rage, he smashes the window and takes two tins. Then he lets himself get arrested for theft and tried at the court where Schramm is working. The latter, scared that the peddler may give everything away in the courtroom, steals and destroys Rudi's death warrant.
In order to appease (and bribe) Rudi into silence, Schramm himself decides to preside over the charges in the case, and really clumsily downplays Rudi's intent of stealing the chocolate. During the cross-examination, he gets so nervous and wound-up in the secret that both of them have kept so far, that he drifts off and flashes back to the military trial. When he is then asked by the judge to propose an appropriate sentence, he flounders and sentences Rudi to death... again.
Now that he himself has let the cat out of the bag, Rudi breaks down in hysterical laughter, and the three acquaintances turn up to confirm the prosecutor's guilt. Schramm panics and storms out of the courtroom, discarding his robe on the steps of the building.
The entire affair is widely publicised ("Another Judiciary Scandal!"), the three acquaintances rave about how fiercely they had opposed the prosecutor, Schramm is tried for his crimes and Rudi settles down with his girlfriend.