M should be understood as the movie in which Fritz Lang accomplished two incredible feats. First, he turned the opportunity to make his first sound film into one of the most groundbreaking sound films of the early talkie period and, arguably, the most influential. Second, Lang created a complex moral allegory on par with the finest literature and resistant to the easy answers that moralizing films of the time tended to seek.
As a sound film, M is lauded for the way that it uses sound not as a gimmick, but to truly expand the world and narrative of this film. Lang clearly took joy in the possibilities that sound afforded in film, reveling in diegetic music, such as the girl's morbid song in the first scene of the film or Hans Beckert's whistled rendition of Edvard Grieg's "In the Hall of the Mountain King" twice in the movie. Lang truly made M a pleasure to watch, using dialog to immerse us in a world.
Further to that point, Lang also innovated in the technique known as sound-off wherein the audience hears a sound come from somewhere out of frame. Considering the fact that the first sound film came out just two years prior to M, Lang's move to expand the world of his film past the single image we're watching at any given moment is remarkably forward-thinking. M is generally regarded as Lang's masterpiece because he struck gold with this perfect confluence of form and narrative, on his very first sound film no less.
And Lang even used sound to expand the world of the movie further than the movie itself. As film historian Todd Herzog points out in his essay on the film "Fritz Lang's M (1931): An Open Case," audiences would have recognized the song the girl sings in the beginning of the film as a riff on the "Haarman Song." That too was a song about the serial killer Fritz Haarman who was captured in 1925. As Herzog points out, Lang's use of the Haarman Song "serves to locate M in a specific historical context, the world of the Weimar Republic at the time of the film's release." Even though the city this film takes place in is never identified, German viewers would have been able to recognize their period as distinctly their own.
Why was this important to Lang? At the time, Lang declared that his film was a "documentary report." It certainly engaged the cases of real serial killers during the Weimar period, but it seems a lot more likely that Lang was looking to report on the conditions of his society rather than the travails of any particular killer.
Hence, we have copious scenes of aristocrats living in excess and a bloated government ruling ineffectively. We also have scenes of vibrant nightlife and a complex underworld that has likely developed to supply that nightlife's indulgences. These are signifiers of the Weimar culture, often considered something of an interwar Babylon. We see, too, the unmistakable grind of working-class life, the alienation of urban living, and the faces blending into the bourgeois crowd. These were also facts of life in the Weimar Republic, for those who were less affluent.
Why does Lang weave this rich social tapestry? It's clear that he seeks to investigate the attitudes and movements that are sweeping through the tumultuous Germany of his time. After all, the Weimar Republic is known as much for its modernist art and sensual excess as for being the breeding ground for serial killers and rising fascists. At the time Lang made M, the Nazis had already assumed enough power to scare him out of naming his film Murderer Among Us.
Lang's expert move as director was choosing the most loathsome individual he could as the center on his documentary report about German society. He chose the child murderer Hans Breckert largely to launch a greater inquiry about when we stop considering a man a human and start considering him a monster, and what we are capable of doing as a society when we are hunting our monsters. The long and short of it is that we are not capable of much good.
But equally salient is the fact that Beckert seems to embody something about the shell-shocked nature of post-World War I Germany. We witness two moments when Beckert loses it. The first comes during a fit of apoplexy right before he seeks his second victim of the film, and the second comes during his famous monologue in front of the court in the distillery. It's notable that Beckert displays some telltale signs of shell shock in these moments. In his book Shell Shock: Weimar Cinema and Culture, Anton Kaes describes the symptoms as such: "flashbacks, repetition compulsions, psychosomatic illnesses... Traumatic experience manifests only through symptoms, and therefore requires that its meaning be constructed retroactively."
Lang, then, likely uses Beckert as an avatar of the German spirit during the Weimar era, traumatized by World War I and acting out in a variety of shocking and erratic ways.