Children are playing outside in the courtyard of an apartment building. As children are wont to do, they accompany their play with a macabre little ditty; in this case, a song about a child killer. The song is based on imminent reality: a poster warns the public of the danger to their children.
A shadow falls across that poster as a little girl bounces her ball against the post on which it has been plastered. A man’s voice compliments the look of her ball and asks her name.
Elsewhere, a mother is making lunch for his little girl, Elsie. The daughter is not yet home so she places the meal into the oven so it will stay warm. The face of the man who asked the little girl’s name is seen for the first time as he purchases a balloon from a blind street peddler. All the while he is whistling a section from Edvard Grieg’s “In the Hall of the Mountain King.” His name is Hans Beckert and amidst a collage of images showing Elsie’s mom getting increasingly anxious about her missing child and heading out into the stair to call her name, her pretty ball rolling absently away and the freshly purchased balloon caught in some wires, he is busy murdering little Elsie Beckmann.
A newspaper report on the latest child victim ramps up calls for more police action. Beckert himself even fires off letters of outrage to the newspaper about the lack of the police to bring this vile killer to justice. The police, meanwhile, launch a city-wide investigation into the haunts of all known criminals and criminal organizations in the city. Under such intense focus, the effect is that this mystery child killer is impacting not just business as usual in the normal course of daily life, but among the underworld as well.
Leaders of the underworld gangs call for a meeting to discuss how to deal with this situation in the face continuing failure by the cops to catch the killer. Meanwhile, Inspector Lohmann initiates a brand new approach: checking the records of those who have been recently released from mental institutions for psych cases with a history of committing violence against kids. With the cops going after mental case and the criminals keeping a close watch on the streets and helping to furtively guard the city’s children against suspects, the net begins to close around Beckert who has become increasingly frustrated in his prowl for his next victim.
One potential young girl meets up with her mother before he can act. Then things get even worse for him, though remains unaware of the danger he now faces: when he finally does succeed in befriending a young victim, the blind peddler recognizes him as the last person to see Elsie alive courtesy of the song he keeps whistling. The peddler passes this information along to an associate and soon a network of beggers are cooperating in tailing Beckert without his knowledge. One of them pretends to trip and as he “accidentally” bumps up against Becker he manages to draw the letter “M” on his back as a means of identifying him. The “M” stands for Murderer.
Meanwhile, the police investigation gets the break it’s been hoping for with the discovery of letters in the room that Beckert has been renting that match the letters he mailed.
Eventually, Beckert realizes that he is being followed and manages to lose them inside an enormous office building just as the time the place is flooded with workers going home. The beggars contact the head of the underworld—Der Schranker—and soon a gang of toughs descend upon the office building, tying up a security guard to get their information. Nevertheless, a systematic search operation must be engaged that takes the criminals from the cellar to the attic before Beckert is finally discovered. They are almost caught themselves when one of the other security guards trips an alarm. All but one of the gang manages to escape with Beckert in tow. When the police learn that nothing was stolen, they work on their captive to determine the purpose and eventually learn everything, including the destination the crooks have in mind for the suspected child killer.
That destination is an old abandoned distillery where Beckert is being tried by a hastily constructed kangaroo court. Even so, Beckert is provided with counsel who does try to make an argument for his defense. That defense falls on the deaf ears of the jury, however, even after Beckert himself takes over and makes an even more convincing case that he a murderer without desire or control who is filled with regret afterwards whereas even the “judge” who presides over his case is currently facing three charges of homicide himself. Finally, Beckert can do nothing more than plead to at least be allow himself to be handed over the police. It is too little, too late, however as the kangaroo court has been so riled up by the emotions that they want nothing more than his blood.
Before they can carry out this justice, however, the police arrive and arrest not only the child killer, but the criminals holding court.
Beckert ultimately gets the legal trial he desired, but before a verdict is presented, Elsie’s mother admits that there is no sentence possible which can give them what they really want: to have their children alive and back with them. She also admonishes everyone to keep a closer watch over the children.