On a Saturday morning in August 1981, Phil Boerner arrived outside a flat at 142 West 109th Street in New York.

He and his new flatmate took about 10 trips to unload his goods from a car and take them to apartment 3E. They then carried up the frame of a bed. The mattress was carried by Dr Emmett Bassett.

This, dear reader, is detail. It becomes noteworthy only because Boerner's flatmate was Barack Obama. It becomes a matter of record because David Maraniss has invested his biography of the early years of the US president with the sort of scrupulousness worthy of a binding court ruling. This detail is lifted from the drearily banal because it not only adds another dot to what slowly becomes a spellbinding portrait of Obama but records, dutifully and intriguingly, Dr Bassett's distinguished history as an African American pioneer in social activism.

This is a story of a president but it is populated with a cast of characters who have been drawn precisely. Maraniss's work – and it is the result of a hard labour of extensive research – stretches to more than 600 pages with index and notes. A further 23 pages of introduction includes the unapologetic announcement: "This volume is not a traditional biography." Indeed. Obama makes his first appearance in chapter seven, 184 pages in. The reader bids farewell to the subject on page 571 with Obama just 27 and heading to Harvard Law School.

This meticulous treatment makes Robert A Caro's work on Lyndon B Johnson, which has encompassed 36 years of writing and research, seem positively pacey. The research of Maraniss, and his team of reporters and aides, is praiseworthy. However, its most beneficial aspect is that it serves as the solid foundation of a substantial investigation of the background, character and development of an unlikely candidate for the role as most powerful man in the world.

The making of the first African American president of the USA invokes a set of circumstances so odd that, while every existence is a small miracle, Obama's presence in the world is the most vivid testament to the strangeness of life, even lives.

Briefly, he will march into the Oval Office this morning as a result of a series of events that saw an African from a village on the edge of Lake Victoria meeting a teenager from Kansas at Russian class in Honolulu. The African and the MidWest woman soon made love, married briefly because of the resulting pregnancy and never enjoyed more than the shortest of relationships. The boy, like Superman crashlanding in a cornfield after escape from Planet Krypton, was raised by surrogate parents. In Obama's case, it was his maternal grandparents.

Genealogists have studied the president's bloodline and drawn up a precise definition. Obama, born August 1961, is 50% Luo (the Kenyan tribe of his father), 37.4% English, 4.4% German, 3.125% Irish, 3.125% Scottish, 1.56% Welsh, 0.195% Swiss and 0.097% French. A worryingly high proportion of his constituents believe the president to be a Muslim born outside the US. He is a Christian born in Hawaii, though his father and grandfather were nominally Muslims though hardly observant.

There is a science and a fastid-iousness to much of the above but Maraniss, hammering at the anvil of fact, must forge something else or face accusations of merely inducing tedium. Instead, he manufactures, with a compelling certainty, a brilliant and important book. His purpose is audaciously ambitious. He wants to show where Obama came from and what made him. This demands a facility to marshal information but the writer must have the ability to make that detail breathe, make it spring from the page in human form.

Marannis, author of peerless works on Bill Clinton and Vince Lombardi, the American football coach, examines how Obama's destiny was only slowly revealed. There is a protective armour around the personality of the president that perhaps only his wife and daughters have pierced. Marannis surveys this character with the tools of an indefatigable reporter and the instincts of an insightful writer.

Obama was formed without close contact from either parent. He never knew his father, meeting him once as a child. His relationship with his mother was intermittent, unsatisfactory. Obama left her in Indonesia to go to school in Hawaii. The subsequent contact was fleeting. He was raised by his maternal grandparents to be a bright schoolboy, a searching student who chose study over pot-smoking and a dedicated seeker of knowledge and purpose. The stuff of greatness, though, was not immediately obvious.

Yet this self-contained student was to break the colour bar on the most important elected post in the world. Twenty years after Maraniss leaves Obama on the steps of Harvard, the would-be lawyer or writer takes the oath of presidency. How, and most intriguingly, why?

Some of the answers lie in grandparents who played supportive and influential roles. The kindly bombast of Stan Dunham was complemented by the unflinching work ethic of Madelyn. The grandfather was condemned to jobs he hated so Obama learned never to be trapped into a prison of daily unfulfilment. The grandmother showed him that work may be hard but it was necessary.

The parents supplied the fuel. Barack Obama Sr was the alcoholic, violent and ultimately desperate son of a brutal father who passed on a propensity for abusing and abandoning women. He died drunk in a car crash. The president's mother also died prematurely, at 53, from cancer. She was an anthropologist who became immersed in work. The son inherited his father's intellect and was the heir to his mother's deep empathy. She believed her son would achieve greatness in life by helping others and often told him so.

However, Obama seemed more likely to become a writer than a politician. The crucial turning point came after he became a community organiser in Chicago. He learned there that he had the ability to relate to people, to listen to problems. He learned, too, that change was only possible through power. He applied to Harvard, knowing that a law career offered him eventual financial security and the base to achieve that power.

The author's use of detail places the future president authentically in a time and a place but it also hints with a quiet wisdom of the marvellous promise to come. The facts, too, are illuminated by scenes of uncommon power. None is more revealing, more affecting than when Obama travels to the village of his African ancestors and is told of the history and struggles of his forefathers. He stumbles from a mud hut and falls on his knees in tears between the graves of an unfulfilled father and a grandfather who was a colonial servant.

Obama did not know then where he was going. But he learned on that day where he had come from. There was pain in that but strength too.

Barack Obama:

The Making Of The Man

David Maraniss, Atlantic, £25