For eight years, Samantha Power served President Obama as an aide and then as U.N. Ambassador but also as an in-house conscience on matters of foreign policy. When she entered the White House, at the age of thirty-eight, she had already established a reputation as a kind of Joan of Arc for humanitarian intervention. Ben Rhodes, an Obama foreign-policy adviser and speechwriter, imagined that she bore a permanent tagline that seemed to announce her position at every meeting: Samantha Power, Pulitzer Prize-winning author of “ ‘A Problem from Hell’: America and the Age of Genocide.” When innocent lives were threatened abroad, Power frequently pushed for forceful action. Obama said that he welcomed her advocacy, but he sometimes bristled when she voiced it. More than once, Obama told Power, “You get on my nerves.” In 2013, during a meeting in the Situation Room to discuss Syria, Obama, put off by her arguments, snapped, “We’ve all read your book, Samantha.”

In “ ‘A Problem from Hell,’ ” published in early 2002, Power detailed a century’s worth of American inaction in the face of grotesque massacres: of Armenians in the Ottoman Empire during the First World War, in Europe during the Holocaust, in Rwanda in 1994, and in the Balkans for much of the nineties. Power had gone to the Balkans as a freelance reporter fresh out of Yale, and witnessed the violence that raged as the former Yugoslavia came apart. Like most people who saw the war up close, she understood that the violence was not primarily a spontaneous outburst of old hatreds but the result of ethnopolitical machinations. Ethnic and sectarian enmity, fomented and backed by the Serbian leader, Slobodan Milošević, was unleashed in terrible waves of killing, rape, and starvation. In “ ‘A Problem from Hell,’ ” Power wrote of Sidbela Zimic, a nine-year-old Bosnian girl who had been jumping rope in front of her apartment building in Sarajevo with her friends when she was killed by a Serbian shell. When Power arrived, a few hours later, she found only a pool of blood, a jump rope, and girls’ slippers.

Power was enraged by claims in the West that nothing could be done. President Clinton was famously persuaded by “Balkan Ghosts,” a travelogue written by Robert D. Kaplan, who argued that Balkan antagonisms were too deep-rooted and mysterious for outsiders to fathom. “Their enmities go back five hundred years, some would say almost a thousand years,” Clinton told Larry King. As Clinton dithered, a hundred thousand people died.

What finally moved Clinton to act was not ethics but politics: in 1995, as he prepared to run for reëlection, images of Serbian barbarities began to affect his prospects. That summer, he ordered devastating air strikes on Serbian military positions and dispatched an envoy, Richard Holbrooke, to pressure the parties to make peace. In Dayton, Holbrooke forged a deal that stopped the killing. A few years later, when Milošević launched a violent campaign against separatists in Serbia’s ethnic-Albanian province of Kosovo, NATO intervened fast and hard with an air campaign, pushing out the Serbian Army and clearing the way for the Kosovars to secede.

“ ‘A Problem from Hell’ ” built upon the lessons of the Balkans: not just that the American intervention had stopped the bloodshed but that, in Bosnia, it had begun three years too late. Power advocated greater interference in countries’ internal affairs in defense of an unwavering principle of humanitarianism. “Given the affront genocide represents to America’s most cherished values and to its interests, the United States must also be prepared to risk the lives of its soldiers in the service of stopping this monstrous crime,” she wrote.

The book inspired a generation of activists, helping to establish the doctrine of “responsibility to protect,” which held that the United States and other wealthy countries had an obligation to defend threatened populations around the world. It also made a star of its author, a charismatic, cracklingly smart presence who urged others to take up the cause. “Know that history is not in a hurry but that you can help speed it up,” she told Yale’s graduating class of 2016. “It is the struggle itself that will define you. Do that, and you will not only find yourself fulfilled but you, too, will live to see many of your lost causes found.”

Power’s book didn’t offer much discussion of failure, of the limitations of intervention, even in places where it was unclear that American efforts could have succeeded. In Rwanda, which is often cited as an example of U.S. inaction, most of the killing was done so swiftly—eight hundred thousand people in three months—that it’s hard to imagine the American bureaucracy and military orchestrating a response quickly enough to make a difference, and then staying around long enough to insure that violence didn’t recur. But in 2002 the notion that America could police the world didn’t seem so far-fetched. NATO had recently taken on three new members. China’s economy was a tenth of its present size. The World Trade Center had been destroyed, but the U.S. had toppled the Taliban government in Afghanistan. The invasion of Iraq was still a year away.

The wars in Afghanistan and Iraq were not pitched as humanitarian interventions. (That came later, as proponents looked for retroactive justification.) But for many in the American foreign-policy establishment the coming decade served as a rebuke to the idea that the U.S. could remake the world. In Iraq, the U.S. occupation—in its incompetence and brutality—became emblematic of American decline. In 2014, less than three years after the Americans departed, the Iraqi Army collapsed, and the state nearly followed. In Afghanistan, U.S. officers, soldiers, and diplomats were almost entirely ignorant of the country and its languages, and relied on gangsters and strongmen to further their aims. The result was a state that functioned mostly as a sprawling extortion racket—the Americans called it VICE, for “vertically integrated criminal enterprise”—and that, by its lack of legitimacy, helped Taliban recruitment. Nearly two decades after the occupation began, U.S. diplomats are now negotiating a final exit from the country; the Afghan state seems unlikely to fare any better than the one the Americans built in Iraq.

Power’s new book, “The Education of an Idealist,” takes in much of this tumultuous time. In the opening pages, she warns that the title might suggest that she had “lofty dreams about how one person could make a difference, only to be ‘educated’ by the brutish forces” she encountered. She adds, “This is not the story that follows.” But the book does hint at the death of a dream. Power, who provided Obama with foreign-policy advice when he was a senator and a Presidential candidate, joined the White House in 2009 as a champion of humanitarian intervention in an Administration dedicated to ending the conflicts it had inherited and refraining from entering into others. One of the questions facing the new Presidency was whether someone like Power, an insistent voice for the primacy of morality over politics, could be effective—or whether the idea of humanitarian intervention, on which she had built a career, had essentially exhausted itself.

The first test came in early 2011, with an uprising against Muammar Qaddafi, who had dominated Libya for forty-two years. Rebels had seized Benghazi, the country’s second-largest city. Qaddafi dispatched several thousand troops to crush the revolt.