Nothing has changed more in the past couple of decades than attitudes toward the crisis of incarceration in America. What was largely an invisible civilization of confinement—millions of men and women locked up for, cumulatively, millions of years—is now a commonplace concern. Everyone running for the Democratic nomination pays lip service to the need to address mass incarceration, and what were once essential political instincts—to side with the police and the prosecutors in every instance, to “get tough on crime”—have become, at the very least, negotiable. We have gone from “Lock ’em up!” to “Lock ’em up?” to “Set ’em loose!,” all in a relatively short time.

One reason for these changed attitudes is the great crime decline, a falling arc that meant that, for the first time in decades, ordinary citizens could care more about the consequences of imprisonment than they did about the threat of violent crime. Circles of compassion can grow in the absence of everyday fear: safer subways make for an expanded conscience. But there has been an ongoing argument about what, exactly, is responsible for the surge in incarceration. For a long time, the consensus blamed three-strike laws, mandatory minimum sentences, stop-and-frisk, and the rest of the oppressive apparatus of panicked anti-crime policy. Then, just two years ago, the law professor John Pfaff made the argument, persuasively, that the key factor was simply prosecutorial overreach.

There were too many prosecutors who had the astounding freedom to indict anyone more or less as they chose, and who could so overcharge the indicted that plea bargains were forced upon good and bad alike, as confessions were once forced by the Inquisition. By handing enormous discretion to prosecutors—some of them, by the standards of the rest of the world, properly described as politicians, elected to their office and sensitive to voters’ needs, including a metric of success linked to putting people in jail—we had given them the freedom to imprison whomever they wished for as long as they liked. All but about five per cent of criminal cases are resolved by plea bargains, and never go to trial. In the vast majority of cases, Pfaff observed, in his book “Locked In,” inmates ended up behind bars “by signing a piece of paper in a dingy conference room in a county office building.” After 1990, as the crime rate began to fall, the number of line prosecutors soared, and so did the number of the incarcerated. Fewer offenses, more designated offenders.

Now the legal journalist and Times Magazine staff writer Emily Bazelon, in her book “Charged” (Random House), puts flesh and faces to Pfaff’s statistical and largely abstract proposition. “Charged,” though far-reaching in purpose, is above all a study of two cases in which prosecutorial misconduct or overreach put two people through hell. She tells these stories in microscopic detail, analyzing the background of each bizarre stop along the infernal circle—why bail is so hard to get and why it exists at all; why public defenders are often so inadequate—in a way that allows the specific case stories to become general truths. Her book achieves what in-depth first-person reporting should: it humanizes the statistics, makes us aware that every courtroom involves the bureaucratic regimentation of an individual’s life. She has a good ear for talk, and a fine eye for detail; at one point she makes the slightly hallucinatory discovery that the recently elected Brooklyn D.A., Eric Gonzalez, chose his career path after reading Tom Wolfe’s “The Bonfire of the Vanities” as a teen-ager—not an obvious book to point someone on a path toward public service. (He was fascinated not by the deep cynicism of Wolfe’s view but by the way that the D.A. in the novel is able, heroically, to even things up with a Master of the Universe—proof, again, that we find in books what we want to find in books.)

Yet, though Bazelon’s larger points about the madness of prosecutorial power are all impeccably well taken, the two central cases she uses to illustrate these points are somewhat surprising choices. It wouldn’t be hard to find, among the tens of thousands of cases that are plea-bargained in New York City alone every year, one in which a poor kid is penalized by a law that’s out of all proportion to the offense—there are kids who get locked up for drug offenses that in nearby states are no longer even misdemeanors. But Bazelon has written about a twenty-year-old black New Yorker, whom she calls Kevin, who has been arrested for the illegal possession of a loaded handgun and, given his particular charge, was subject to two years of imprisonment, the “mandatory minimum” stipulated by New York’s strict anti-handgun laws. Kevin may well have been, as he insists and as Bazelon accepts, little more than an innocent third party to the gun offense—“holding” the gun for friends rather than using it, or intending to use it, in the commission of a crime. But his prospective sentence was not simply a result of prosecutorial overreach; it was an unintended outcome of well-intended efforts at gun control. Gun violence is an especially brutal plague in poor and minority neighborhoods, and Bazelon acknowledges that Bill de Blasio, the city’s most progressive mayor in decades, has been even more rigorous than his predecessors in encouraging these mandatory-minimum gun-possession indictments.

It’s also true that, on the evidence, there was nothing to be gained by having Kevin in jail for two years, and that his life could well have been maimed as a result. Bazelon suggests that greater prosecutorial discretion is needed in enforcing a law that can unduly punish a kid like Kevin—indeed, she points out that in some jurisdictions in the city there’s a healthy unspoken understanding that kids like Kevin won’t be charged under the law, using various wiggle-room maneuvers to get them out.

A certain irony of this case is that our sense of justice here demands not less but more prosecutorial discretion—more power to charge or not to charge. Remedying the injustice that the law may produce means adding ever more layers of adjudication. In a book about how the punishment of mere misdemeanors can have life-altering consequences, “Punishment Without Crime” (Basic), Alexandra Natapoff calls this process “net widening”: it includes the attempts, which Bazelon tracks in Kevin’s case, to move his offense out of the normal criminal courts and into a special “diversion” program. This adds bureaucratic labyrinth to unjust arrest. “Each of these reforms makes room for more people in the system,” Natapoff, a law professor at U.C. Irvine, writes. Kevin’s case is less an example of reckless prosecution than it is an example of the unbreakable rule of unintended consequences. A well-meant law caught the wrong kid.

The central case in Bazelon’s book was the subject of a Times Magazine article that she published in 2017, from which the book evidently grew. It’s the case of Noura Jackson, in Memphis, who was convicted in 2009 of brutally murdering her mother, Jennifer Jackson, a thirty-nine-year-old investment banker, and given a sentence of some twenty years. Noura, as Bazelon calls her, served nine years in prison before the Tennessee Supreme Court found that prosecutorial misconduct had been significant enough to overturn the verdict, and ordered a new trial. (After another year, she was then effectively released on time served.) The Shelby County prosecutor, Amy Weirich, had kept a potentially helpful witness statement from the defense, and, in effect, berated Jackson in her summation for not testifying—an outrageous violation of Fifth Amendment protections against self-incrimination.