Early on April 13, 1933, an official from the prosecutor’s office for Munich District II set off to investigate a crime. Three men had been killed in woodland hard by the abandoned Royal Powder and Munitions Factory at Prittlbach, about 10 miles outside the city. Another had been horribly wounded. The stuff of violent personal tragedy, perhaps. Except that the deaths had occurred a short stretch beyond the still-makeshift boundary fence of what the government was calling a “camp for protective custody.” And because no one knew where Prittlbach was, the recently opened detention center had been named after a picturesque nearby town well known as an artists’ colony: Dachau.

Adolf Hitler had been chancellor of Germany for 10 weeks at the head of a coalition administration. On Feb. 27, an arson attack on the Reichstag in Berlin (its true cause still a matter of contention) had already enabled him to suspend many civil liberties. Six days later, on March 5, new elections had been conducted with the full apparatus of government on the Nazis’ side. They made gains but still won less than 44% of the vote, short of an absolute majority. Soon, nevertheless, the Communist Party had been banned and elected provincial governments—including Bavaria’s—replaced by governors appointed from Berlin. On March 24, Hitler browbeat the moderate parties in his coalition into passing an “empowerment law.” After that, he and his henchmen could do pretty much whatever they wanted. And what they wanted to do was to crush all remaining opposition. The wave of arrests that had begun with the Reichstag fire swelled by the day.

There were holdouts against the developing dictatorship. Chief among the areas in which traditional political parties had resisted the surge in National Socialist support were the Rhineland and Bavaria, where the conservative Catholic forces were extraordinarily resilient. The Berlin-appointed Bavarian state governor and justice minister were both Nazis, but Catholic morality, professional integrity and a sharp lookout for Bavaria’s rights still characterized the attitude of many officials. This was certainly true of the 39-year-old Munich prosecutor who went out to Dachau that mid-April morning, Josef Hartinger. He took with him an equally rigorous forensic surgeon, Moritz Flamm. It was a 20-minute drive to the camp, where the two investigators were greeted by the commandant, an SS Hauptsturmführer by the name of Hilmar Wäckerle. A brutal blond vision in black uniform and polished boots, surrounded by menacing toughs, he carried a whip made from a bull’s pizzle, designed to flay a man alive.

Hartinger was no shrinking liberal violet. He had served with distinction in World War I and afterward in the militia that helped suppress, without mercy, the short-lived Soviet Republic of Bavaria. He was religious and politically conservative but also a lawyer with a pronounced sense of justice. The camp commandant was something else. Wäckerle could be charming (he fooled a New York Times reporter, who “investigated” Dachau later that same April and came away singing Wäckerle’s praises), but he was a sadist. The law meant nothing to him. To Hartinger and Flamm, it meant everything. Another investigating team might have avoided what lay ahead.

It was obvious that the three men had been murdered. Supposedly shot from a distance “while trying to escape,” they had, the eagle-eyed Flamm observed, been executed at short range with bullets to the back of the head. They were all political opponents of the Nazis. As much, if not more, to the point, they were all Jews. As was the mortally wounded man, who, the SS guards said, accidentally “ran into the line of fire.” Hartinger had all he needed to bring murder charges.

The story of what happened next, day by tense day, as the deaths mounted up in that fateful spring of 1933, makes up Timothy W. Ryback’s fine and chilling “Hitler’s First Victims: The Quest for Justice.” The details of the Nazi brutality are harrowing; those of the investigation and its ramifications fascinating.

Hartinger was stubborn and brave, fighting obstruction within his department and threats from the newly installed Nazi authorities. He hoped that by drawing attention to the new regime’s murders of opponents and “racial enemies” he could head off the growth of state violence and simultaneously strengthen the hand of German “moderates.” These actually included both the new state governor, Gen. Franz Ritter von Epp—war hero and counter-revolutionary commander, hard-bitten but not fanatical—and, astonishingly in retrospect, the new justice minister of Bavaria, Dr. Hans Frank, who would become notorious as the blood-drenched governor of occupied Poland. In 1933, before power did its work of corruption, Frank retained a diligent lawyer’s desire to act within some vestigial framework of legality.

Hartinger knew that the new Reich government was concerned about criticism from abroad, especially America. Hitler also wanted a concordat with the Vatican, in order to placate Catholic Germany, which contained strong pockets of resistance to his regime. Finally, so Hartinger calculated, there was the matter of Reich president Paul von Hindenburg. Now 85 years old and in failing health, the old field marshal remained empowered under the constitution to sack Hitler from the chancellorship, as he had done with several of his predecessors. Hindenburg cared little for democracy, but he did care for the law, and he had already intervened to limit discrimination against Jews, particularly ex-servicemen.

Despite his nervous superior’s vacillations, Hartinger managed to proceed with indictments. When there were further unexplained deaths—including supposed “suicides”—at the camp, he also included those. By the end of May, he was ready to prosecute the SS guards he thought responsible and hoped the world would learn the truth of what was happening at Dachau. It’s no spoiler to reveal that Hartinger’s plan failed, although he got further than perhaps even he expected. The “moderates” were able to prevail against the Nazi fanatics, and von Epp instructed the chief of the Bavarian police, Heinrich Himmler, to stop the illegal killings. In the end, Himmler went over the heads of both von Epp and Frank and persuaded Hitler to close down the case with a direct order. The paperwork was sequestered, and Hartinger found himself abruptly transferred to another jurisdiction.

With the Nazis ever more firmly in the saddle, the murders at Dachau soon began again, their perpetrators protected by new immunity laws and weasel-worded regulations. The camp authorities soon found ways of disposing of the bodies, leaving no evidence. The Dachau model became the foundation of the Nazis’ concentration-camp network.

This was the beginning of the kill-and-conceal system, created and operated by the SS, that would eventually make routine the deaths of millions of Jews, Gypsies, resistance fighters and anyone else the Nazis deemed inconvenient. Whether the murders that sparked Hartinger’s investigation were actually the first of the Holocaust, as Mr. Ryback claims in the book’s dedication, is debatable, but the pattern is there and the touch of tragic drama perhaps forgivable.

There is an extraordinary postscript. The original papers of Hartinger’s investigation were found after the war in a locked drawer in the Bavarian ministry of justice. The evidence contained in them provided Maj. Warren Farr, one of the Nuremberg Trial prosecutors, with proof that the SS had from the very outset constituted a criminal conspiracy, systematically using terror and murder as a political tool. This crucially eased the Allied war-crimes team’s forensic task.

Josef Hartinger survived the war and returned to his career at the Bavarian ministry of justice. Only in 1984, when he was 90 years old, was he persuaded to allow his defiance of the Nazis to be made public. His was a minor act of resistance to a criminal regime. Yet Mr. Ryback’s important book shows how even such a small, stubborn, apparently futile determination to adhere to the rule of law can, with fortune on its side, help see final justice done. It is fitting acknowledgment of a forgotten German or (as Hartinger might have preferred) Bavarian hero.