A funny book about Afghanistan and Pakistan? It sounds like an oxymoron. Where is the comedy in a terrible war that continues to claim American and Afghan lives? What is comic about suicide bombers and I.E.D.’s, or a nuclear-armed Pakistan, reeling from corruption, violence and chronic dysfunction?

What’s remarkable about “The Taliban Shuffle” is that its author, Kim Barker — a reporter at ProPublica and the South Asia bureau chief for The Chicago Tribune from 2004 to 2009 — has written an account of her experiences covering Afghanistan and Pakistan that manages to be hilarious and harrowing, witty and illuminating, all at the same time.

It’s not just that Ms. Barker is adept at dramatizing her own adventures as a reporter — though she develops the chops of a veteran foreign correspondent, she depicts herself as a sort of Tina Fey character, who unexpectedly finds herself addicted to the adrenaline rush of war. It’s also that Ms. Barker has discovered a voice in these pages that enables her to capture both the serious and the seriously absurd conditions in Af-Pak (Afghanistan and Pakistan), and the surreal deal of being a female reporter there, with dating problems ranging from the screwball (a boyfriend competing to cover the same story) to the ridiculous (being romantically pursued by the former prime minister of Pakistan).

Black humor, it turns out, is a perfect tool for capturing the sad-awful-frequently-insane incongruities of war.