Favreau began looting Dreams the moment Senator Obama hired him, in 2005, incorporating elements of it into commencement addresses and later the presidential campaign. Seemingly, every major Obama speech references his memoir: the African father and the Kansas mother and the grandparents serving during World War II; his early struggles as a community organizer (“One of the greatest things I’ve learned from him is that there’s no weakness in talking about failure,” says Favreau); and his travels through Indonesia and Kenya, which find their way into his foreign-policy addresses.

But the template only goes so far. When the subject isn’t policy but Obama’s personal values, says Frankel, “you just wouldn’t presume to write something for him. He has thoughts nobody can characterize.”

This was especially true last March 13, when the incendiary sermons of Obama’s pastor, Jeremiah Wright, blew up all over the cable networks. On that Thursday, Obama had spent the entire day and evening in the Senate. That Friday, after enduring a series of tough interviews, Obama informed Axelrod and campaign manager David Plouffe, “I want to do a speech on race.” And he added, “I want to make this speech no later than next Tuesday. I don’t think it can wait.” Axelrod and Plouffe tried to talk him into delaying it: He had a full day of campaigning on Saturday, a film shoot on Sunday, and then another hectic day campaigning in Pennsylvania on Monday. Obama was insistent. On the Saturday-morning campaign conference call, Favreau was told to get to work on a draft immediately. Favreau replied, “I’m not writing this until I talk to him.”

That evening, Saint Patrick’s Day, less than seventy-two hours before the speech would be delivered to a live audience, Favreau was sitting alone in an unfurnished group house in Chicago when the boss called. “I’m going to give you some stream of consciousness,” Obama told him. Then he spoke for about forty-five minutes, laying out his speech’s argumentative construction. Favreau thanked him, hung up, considered the enormity of the task and the looming deadline, and then decided he was “too freaked out by the whole thing” to write and went out with friends instead. On Sunday morning at seven, the speechwriter took his laptop to a coffee shop and worked there for thirteen hours. Obama received Favreau’s draft at eight that evening and wrote until three in the morning.

He hadn’t finished by Monday at 8 a.m., when he set the draft aside to spend the day barnstorming across Pennsylvania. At nine thirty that night, a little more than twelve hours before the speech was to be delivered, Obama returned to his hotel room to do more writing. At two in the morning, the various BlackBerrys of Axelrod, Favreau, Plouffe, and Jarrett sounded with a message from the candidate: Here it is. Favs, feel free to tweak the words. Everyone else, the content here is what I want to say. Axelrod stood in the dark reading the text: “The profound mistake of Reverend Wright’s sermons is not that he spoke about racism in our society. It’s that he spoke as if our society was static; as if no progress has been made.… But what we know—what we have seen—is that America can change. That is the true genius of this nation. What we have already achieved gives us hope—the audacity to hope—for what we can and must achieve tomorrow.”

He e-mailed Obama: This is why you should be president.

*****

for most politicians, well-delivered speeches are the fruit of rehearsal. That’s not necessarily the case with Obama, who has given some of his best speeches without benefit of a run-through. One of these was the joint session of Congress speech delivered this past February—his first speech before the body. Chief of staff Rahm Emanuel, not yet accustomed to Obama’s methods, was apoplectic just before the speech, hollering, “No one gives that speech without a run-through!” (Observes Axelrod: “Rahm does yoga, but not Zen.”) Though his teleprompter is proof that Obama does not believe in truly winging it, he requires less rehearsal than most presidents because he’s deeply involved in shaping the words from their inception.

“I don’t think he sits down and stares at a blank page waiting for the muse to come and kiss him, you know,” says Axelrod. “But I also think he needs the deadline. It’s a motivator—it trains the mind.” This is Axelrod’s charitable way of saying that Obama does his writing at the eleventh hour, when his aides are on the verge of meltdown.

A major presidential address by Obama begins in the Oval Office, where he talks through the content with his writing team. Or rather, it begins sometime before then, since Obama—who even as a community organizer used to spend hours alone in a state of pure reflection—tends to martial his thoughts into infuriatingly coherent form while no one is around.

One Saturday morning this past May, for example, Obama summoned Ben Rhodes and national-security spokesperson Denis McDonough to discuss a speech he would be delivering in Cairo to the Muslim world. For an hour, Obama paced the Oval Office as he talked: “There are these tensions between the West and Islam. They’re rooted in colonialism.…I want a set piece where we talk about the contributions of Islam.” Islam and the West weren’t separate categories, he went on—and he knew this, because “I’ve lived in both worlds.” He listed a few commonalities—the desire for work and education, the love of family and God—and then said, “These things we share.” At one point he observed, “Suppressing ideas never makes them go away”—and recognizing that the line was a keeper, Obama made sure that Rhodes had it down verbatim. The same with, “I reject the view of some in the West that a woman who chooses to cover her hair is somehow less equal, but I do believe that a woman who is denied an education is denied equality.” (McDonough and Rhodes tried to conceal their envy. They’d spent days meeting with experts inside and outside of government on how to handle the issue that their boss had now crystallized in a single sentence.)