Michael Lewis has spent his career excavating subjects that seem, at first glance, almost aggressively boring: esoteric areas like sabermetrics, heuristics, mortgage-backed securities and credit-default swaps, algorithmic trading based on high-frequency financial data, sovereign debt. No matter how arcane the material, he invariably finds some fascinating narrative thread to suck readers in.

His latest work, about government bureaucracy, is no exception.

“The Fifth Risk,” which W.W. Norton will publish in October, paints a dire picture of the chaos and mismanagement in the departments of Energy, Agriculture and Commerce during the transition from President Barack Obama to President Trump. Within these seemingly dull, benign bureaucratic systems, Mr. Lewis encountered devoted public servants struggling with understaffed and neglected agencies while confronting potentially catastrophic risks. In the Department of Energy, which oversees international nuclear risk, understaffing means there might not be enough inspectors to track down black market uranium. Proposed cuts within the Department of Agriculture could dilute critical anti-poverty programs like school lunches and food stamps.

“I was shocked by the richness of the material,” Mr. Lewis said. “Buried in the middle of this is a civics lesson, for myself as much as anyone else.”

The book began last year as a series of dispatches for Vanity Fair, where Mr. Lewis was a contributing writer for a decade. (He has since left the magazine and shifted his longform journalism to Audible, the audiobook producer and retailer). Mr. Lewis went to Washington to report on how different departments were adapting under the Trump administration. His dreary-sounding assignment was to study the material that had been prepared for political appointees coming in to head the departments under the new administration. (Agriculture employees, for example, had prepared a 13-volume overview of its programs that spanned 2,300 pages). He found it riveting.