More than most other presidents, Barack Obama was elected to the office even more for who he was than for what he had accomplished. However, despite his extensive time on the national stage he remains something of a mystery. Mr. Obama’s aloof demeanor and tendency to offer a tight control on revelations about his life have made it a challenge to find out what makes him tick. His own memoir, “Dreams from My Father,” is self-serving (as most are) and has numerous errors of omission and commission.

Some of those shortcomings have been revealed in earlier books, but David Maraniss‘ “Barack Obama: The Story” is the best written and most comprehensive of the biographies of the president.

Mr. Maraniss, a Pulitzer Prize-winning associate editor of The Washington Post, has traveled to all the places that influenced the president’s development and spoken to many people with whom he interacted.

While the book is long and only covers the period before Mr. Obama started law school, those who read it will have a better understanding of the Obama presidency. Fortunately, the author avoids psychobabble and follows the cardinal rule of good writing: show, don’t tell.

Because he was a product of a mixed-race marriage, was abandoned by his father and moved around a great deal (with most of his childhood spent in Hawaii and Indonesia), much has been said about Mr. Obama’s search for certainty and belonging.

Mr. Maraniss contends that because of these experiences the president has a “determination to avoid life’s traps.” He is always thinking several steps ahead to avoid being placed into a situation in which he is uncomfortable and overly pressured. In addition, he hardly ever lets people get too close.

A former girlfriend, Genevieve Cook, said that it “felt like he had a veil hanging between himself and the outside world. And nothing got past that veil without double-checking, inwards and outwards.”

Mr. Obama’s relationship with his parents sheds much light on his persona, and Mr. Maraniss does a masterful job of explaining the details in an informative and elegant manner.

The elder Barack Obama only saw the future president once (for a three-day visit) after his birth. Nevertheless, Mr. Maraniss devotes a great deal of time to explaining his life story, including his brilliant mind and troubled personality. He was an accomplished economist, yet he drank heavily and abandoned the children he fathered with three different women. He was killed in a traffic accident after an evening of drinking.

To contextualize that side of the Obama story, Mr. Maraniss also provides a great thumbnail history of Kenya in the 20th century and its fight for independence. This history lesson, and the comparable treatment of Kansas history when explaining the roots of Mr. Obama’s maternal ancestors, makes the narrative much richer.

Speaking of Kenya, Mr. Maraniss comes down firmly on the side of those who do not think the future president was born there. The author notes that it is unlikely the elder Obama and his wife would have snuck off to Kenya for the birth because at the time the Immigration and Naturalization Service determined that the elder Obama “warranted a close watch”because of lies he told when he first came to the United States to study.

The author notes that even though Mr. Obama’s mother, Stanley Ann, was often physically present, she was so involved in her career and in raising her daughter from a subsequent marriage that the future president was often living with his maternal grandparents.

Mr. Maraniss describes the future president’s relationship with his mother by writing of a “mother and her only son, making their way alone and apart, yet together.”

The descriptions of Mr. Obama’s family are insightful, but readers learn a great deal from his former bosses, professors and classmates.

One former professor emphasized the importance of listening, analyzing and then deciding, which was very much part of Mr. Obama’s modus operandi.

A former college classmate said that Mr. Obama “listens and he listens and he listens, rather than respond immediately to the first thing that’s out there.”

While that is an admirable characteristic, it sometimes means that Mr. Obama comes across as too passive and not willing to fight hard for what he believes.

Mr. Obama is a complex and controversial person who is something of an enigma. Those who want to understand him better would do well to read “Barack Obama: The Story.”

• Claude R. Marx, an award-winning journalist, regularly reviews books for publications such as the Boston Globe and the Weekly Standard.