Mr. Bernanke’s narrative underscores the ad hoc nature of this effort. In one instance, Mr. Bernanke and Timothy F. Geithner, the Federal Reserve Bank of New York president at the time, agreed by email that a new $10 billion-a-week lending program was not big enough.

“The number seemed small to me,” Mr. Bernanke writes. “I emailed Geithner, and he agreed. A half-hour later, we were at $25 billion a week, or $100 billion for the month of March.”

In a few instances, Mr. Bernanke also acknowledges, the Fed could have done more. He writes that the decision not to lower rates in September 2008, immediately after the collapse of Lehman Brothers, “was certainly a mistake.” The Fed’s benchmark rate then stood at 2 percent; by the end of the year, it had been cut nearly to zero.

But Mr. Bernanke emphasizes that the Fed was legally constrained from taking some steps. It could not find a legal way to save Lehman Brothers, he argues in the book, nor could it prevent the American International Group, the insurance company, from using bailout funds to repay creditors, including Goldman Sachs and JPMorgan Chase. (Not everyone agrees with those assessments.)

He also says the Fed’s stimulus campaign after the crisis was sometimes constrained by the hesitations of other Fed officials about the consequences of such large and untested measures.

His sharpest words, however, are reserved for Congress. Mr. Bernanke, a former economics professor at Princeton, often seemed to suffer through his appearances before lawmakers; he writes of those encounters, “It was inevitable that they would ask questions for all sorts of purposes, but rarely because they were curious about the answer.”

He also expresses puzzlement that politicians who were friendly in person would sometimes turn on him in public settings. “I could never get used to the Jekyll-and-Hyde nature of politicians,” he writes. Most of all, however, he chastises Congress for damaging the economy, citing several episodes, including the 2013 government shutdown.