James McBride won the National Book Award on Wednesday night for “The Good Lord Bird,” an irreverent, sharp-eyed novel narrated by an escaped slave. It was published by Riverhead Books, part of Penguin Random House.

Taking the stage with a stunned expression, Mr. McBride, who was considered an underdog in speculation before the awards, said he had not bothered to write a speech.

Mr. McBride wrote the book amid personal tragedies, he said, naming the deaths of his mother and his niece, and the unraveling of his marriage.

“It was always nice to have somebody whose world I could just fall into and follow him around,” he said.