FORTUNE -- Editor's note: This week FORTUNE is publishing excerpts from its favorite business books of 2010. We start with author David Kirkpatrick's book from May, about, as it turns out, TIME's 2010 Person of the Year. Check back each day this week for another excerpt.
If not for founder Mark Zuckerberg's stubborn streak, social-media pioneer Facebook might be just another part of a giant media or tech outfit today. Instead it's a giant on its own, with close to 500 million users, some $20 billion in market value, and millions of investors eagerly awaiting an IPO. For his new book, The Facebook Effect: the Inside Story of the Company That Is Connecting the World, Fortune contributor David Kirkpatrick gained unprecedented access to the company and Zuckerberg, who turns 26 this month. In this adapted excerpt, Kirkpatrick reveals Zuckerberg's turmoil as he resisted takeover offers from a parade of moguls.
--Editor's Note: This story contains profanity.
The Viacom executive figured he'd impress the kid with a ride on the company jet, but clearly it was the youth who was in the driver's seat. Of all the suitors courting Mark Zuckerberg in the fall of 2005, one of the most enterprising was Michael Wolf, president of Viacom's MTV Networks. He had heard college students in MTV's focus groups talking incessantly about the new site, and he was determined to snag it for his parent company. But first he had to "friend" Zuckerberg. Wolf had figured out that the best way to reach the Facebook leader was to instant-message him, so he IM'd Zuckerberg periodically to say he planned to be in Palo Alto -- whether it was true or not -- and suggest a dinner. If Zuckerberg agreed, Wolf would fly out. But as the end of the year approached, Wolf got in touch with a better offer. He was planning to be in San Francisco with the Viacom corporate jet, he claimed. Would Mark like a ride back to New York for the holidays?
Zuckerberg took Wolf's bait. Since Viacom's corporate planes were in fact unavailable, Wolf chartered a top-of-the-line Gulfstream V for the trip from the San Francisco airport to Westchester County Airport, near Zuckerberg's parents' home in Dobbs Ferry, N.Y. Wolf flew out that morning from New York on American Airlines (AMR, Fortune 500). The MTV executive was waiting aboard the G5 as if it were the most normal thing in the world when Zuckerberg arrived, late, about 5:30 p.m. Then, as Wolf had shrewdly planned, they spent five uninterrupted hours together aboard the plane. He was resolved to find a way for Viacom to buy Facebook.
For much of the trip, however, the 21-year-old was in control of the conversation. He interrogated Wolf about MTV's business. How did companies like Viacom make their money? How much did MTV charge for advertising? How do you build your audience?
During the trip Zuckerberg took to admiring the G5. "This plane is amazing," he said.
"Maybe you should just sell a piece of the company to us," Wolf replied. "Then you can have one for yourself."
Wolf invited his guest to sit in the jump seat in the cockpit as the powerful jet landed at Westchester. When it pulled up to the private aviation terminal, two cars were waiting. One was Wolf's corporate sedan to drive him into the city. The other was the Zuckerberg family minivan, from which Mark's parents emerged. They beamed and gave their son a big hug. It was as if he were merely coming home from a semester at college.
The MTV president kept up his pursuit after the holidays, flying to Palo Alto in January with an elaborate PowerPoint presentation and again the next month with a more personal appeal. He and Zuckerberg were becoming chums. They took a long walk around the palmy, well-groomed streets and stopped by Zuckerberg's one-bedroom apartment. The place was messy, with a mattress on the floor, piles of books, a bamboo mat, and a lamp. Then they headed for dinner at a nearby restaurant. Wolf popped the same question he'd asked on the plane. "Why don't you just sell to us?" he asked. "You'd be very wealthy."
"You just saw my apartment," Zuckerberg replied. "I don't really need any money. And anyway, I don't think I'm ever going to have an idea this good again." Viacom (VIA) would try money nonetheless, with a cash offer of $800 million and provisions that could make it worth as much as $1.5 billion. But like many other suitors, the Viacom executives discovered they were dealing with a formidable character. If his invention's early appeal was at a freshman level, exploiting the desire of college students to check each other out, his professed ambition was much higher: to change the world.
Zuckerberg's financing needs were far from his mind when he launched the site on Feb. 4, 2004, from his dorm suite at Harvard. Zuckerberg, a code writer since middle school, had arrived at Harvard equipped with his own computer and a giant whiteboard, the geek's consummate brainstorming tool. He built the site using free, open-source software like the MySQL database and fueled his late-night coding sessions with plenty of Beck's and Red Bull. A month before the site launched, Zuckerberg paid $35 to register the web address thefacebook.com (the name was later shortened) and started paying $85 a month to a web-hosting company. But the infectious appeal of the service went beyond what anyone expected. At the end of the semester, when the user base had reached 100,000 students at 30 schools, a well-connected classmate took Zuckerberg around Manhattan to meet with potential investors. At one of those meetings a financier offered Zuckerberg $10 million on the spot for the company. Mark had just turned 20. His company was four months old. He didn't for a minute think seriously about accepting.
Instead, Zuckerberg decided to relocate his company for the summer to the promised land of technology, Palo Alto. Searching Craigslist, he found a four-bedroom house to sublet as an office and bunkhouse, and persuaded roommate Dustin Moskovitz to give up a summer computer-lab job at Harvard to become essentially his chief operating officer. Keeping Facebook running, which meant constantly adding more servers, was starting to cost real money. Zuckerberg spent about $20,000 in the first few weeks in Palo Alto, using money he had saved from programming jobs. But clearly much more cash would soon be necessary.
A block away in Palo Alto, Internet wunderkind Sean Parker was stressed out. It was a hot afternoon, and the skinny blond 24-year-old hated doing physical work. But his lease was up and he was short on cash. So there he was in June 2004 on the sidewalk in front of his girlfriend's family's house, unloading boxes from the white BMW he had bought when times were flush. When he noticed a group of boys heading toward him, he stiffened. His boxes contained expensive computer gear. He didn't like the look of these kids -- all wearing sweatshirts with hoods up despite the heat. He thought they had a menacing air, but the shortest one walked right up.
"Sean," the guy said. "It's Mark, Mark Zuckerberg." Suddenly it all snapped into place. This was the guy he had met at dinner in New York City two months earlier, the kid who had treated him like a legend for his role in helping Shawn Fanning launch Napster. Later Parker co-founded another Internet company, Plaxo, a contact-info-management venture that had raised millions of dollars from investors. Lately Parker had run into trouble with his backers, who found him brilliant but unreliable. Yet to these 20-year-olds, Parker was an industry sophisticate.
Over dinner in Palo Alto, Zuckerberg witnessed firsthand the denouement of Parker's battle with his Plaxo backers. While Zuckerberg was introducing Parker more fully to his Harvard chums, Parker got a call from his lawyer. The news was bad. The Plaxo board was not only kicking him out of the company but also refusing to allow about half of his remaining shares in the company to vest. Parker was enraged. He was getting screwed. The Facebook boys listened in awe and dismay. "VCs sound scary," Zuckerberg recalls thinking. It was a formative moment. Feeling for his friend, and thinking he might learn much from Parker, Zuckerberg invited him to move into the house with them. By September, Zuckerberg was calling him the company's president. Besides his sage advice, Parker came in handy for one other corporate role: The boys relied on him to buy the alcohol for house parties, since he was the only one in the group over 21.
As the fall semester of 2004 loomed, the company was on the verge of a crisis. Over the summer membership had almost doubled, to 200,000. That was good and bad. "We were just lucky it wasn't completely bringing down the architecture," says Moskovitz. Zuckerberg and Moskovitz had decided not to return to Harvard that fall so that they could focus on the company. But now they needed money. At this point a Silicon Valley startup would typically solicit venture capitalists to make a cash infusion in return for a very big chunk of the company, as much as a third. Zuckerberg didn't want to give up that much control.
Parker called his friend Reid Hoffman, the founder of LinkedIn and a key member of an important Silicon Valley subculture -- the wealthy former leaders of PayPal. Hoffman arranged for Parker and Zuckerberg to meet with PayPal's onetime CEO Peter Thiel, now a private investor. When the Facebook boys made their presentation (Zuckerberg in his usual Adidas flip-flops), Thiel was impressed, especially with what was happening at colleges where Facebook was newly introduced. Within days it typically captured almost the entire student body.
Thiel then made what may be one of the great investments of all time. He agreed to lend $500,000, which would convert into a 10.2% stake in the company, giving the company a valuation of $4.9 million. That was lower than other offers, but Zuckerberg was pleased to have found an investor who seemed to trust him. The extent of Thiel's early advice to Zuckerberg: "Just don't fuck it up." Thiel sold a large amount of his stock in 2009; his remaining shares are worth several hundred million dollars.
During the fall, the originally static Facebook had already started evolving into the revolutionary medium it is today by adding new features like "the wall," which allowed anyone to write on a friend's profile. Membership reached 500,000 by October, and it was soon clear that even Thiel's money wasn't enough to pay for the company's growing infrastructure. But Zuckerberg remained deeply wary of Silicon Valley moneymen. Their thinking was short-term, he felt. His was epic.
Through a classmate whose father worked at the Washington Post Co. (WPO, Fortune 500), Zuckerberg had struck up a friendship with CEO Donald Graham, a member of the family that has controlled the Washington Post since the 1930s. Graham, who was immersed in building the company's own web businesses, recalls being immediately taken. "I thought it was a simply stunning business idea," he says, and made Zuckerberg an investment offer more spontaneously than any he has made before or since. Zuckerberg was impressed with how different Graham was from a bloodthirsty VC. "I was just blown away by the difference in culture -- that it's just such a long-term focus there. I was just like, 'Wow, I want to be more like this guy.' And that's when I seriously started thinking about doing another [investment] round."
As soon as word got out that Facebook was contemplating an investment, the Silicon Valley greed machine kicked into high gear. By February, 12 venture capital firms, four major tech companies, and the Post company were pursuing an investing deal. Viacom suddenly expressed interest in buying the company outright for $75 million, which would have put about $35 million in Zuckerberg's pocket for a year's work. But he had no interest in selling. The Post offer came in at $6 million for 10% ownership, valuing the company at $60 million. Ron Conway, a veteran investor who was advising Parker, told him, "My God! Take it! Close that sucker!" After a bit more haggling, a deal seemed to be done. Until another party entered the picture.
The Accel Partners VC firm was looking for a bigger score. After making its mark in the 1990s with a series of software and telecom investments, the Palo Alto firm had missed out on social-media opportunities. Kevin Efrusy, a junior member of the Accel team, had heard about Facebook from a Stanford University grad student interning at Accel and started making overtures. Parker declined to return his phone calls at first, thinking the VC firm had lost its mojo. Finally, on April Fool's Day, 2005, Efrusy decided to just walk over to Facebook's office. The two executives he encountered, Moskovitz and Matt Cohler (a recruit from LinkedIn), were struggling to assemble office furniture from Ikea. Moskovitz's head was bleeding from hitting a piece of furniture, and Cohler's pants were torn after getting caught on a nail. But their presentation of the business was brilliant, Efrusy recalls. Four days later Efrusy again walked down University Avenue to Facebook's office, barged into a meeting, and slapped a term sheet on the table. It topped the Washington Post terms by far, a $10 million investment valuing Facebook at $80 million. (The deal eventually reached $12.7 million and a valuation of just under $98 million.) After Efrusy left, the young entrepreneurs looked at one another in jubilation. Eighty million? Amazing! "But what about the Post?" Zuckerberg asked. Nobody had a good answer.
That night Accel's co-managing partner, Jim Breyer, a Silicon Valley heavyweight who's also a director of Wal-Mart (WMT, Fortune 500), hosted a dinner for Facebook's leaders at the elegant Village Pub near Palo Alto. The Pub is known for its wine list, and Breyer, a connoisseur, ordered a $400 bottle of Quilceda Creek Cabernet. Zuckerberg, still only 20, ordered a Sprite. Breyer was doing everything he could to loosen Zuckerberg up. But Zuckerberg remained uncomfortable about something. Then he started to tune out, Matt Cohler noticed.
Zuckerberg went to the bathroom and didn't return for a surprisingly long time. Cohler got up to see if everything was okay. There, on the floor of the men's room with his head down, was Zuckerberg. And he was crying. "Through his tears he was saying, 'This is wrong. I can't do this. I gave my word!' " recalls Cohler. "He was just crying his eyes out, bawling. So I said, 'Why don't you just call Don up and ask him what he thinks?' " Zuckerberg took a while to compose himself and returned to the table.
The next morning he did call Graham. "Don, I haven't talked to you since we agreed on terms, and since then I've had a much higher offer from a venture capital firm out here. And I feel I have a moral dilemma," Zuckerberg began.
Graham was disappointed, but he was also impressed. "I just thought to myself, 'Wow, for 20 years old, that is impressive -- he's not calling to tell me he's taking the other guy's money. He's calling me to talk it out.' " Graham knew that even his first offer was very high for a company so tiny and so young. "Mark, does the money matter to you?" Graham asked. Zuckerberg said it did. It could, he went on, be the one thing that could prevent Facebook from going into the red or having to borrow money. "Mark, I'll release you from your moral dilemma," said Graham. "Go ahead and take their money and develop the company, and all the best." For Zuckerberg it was a huge relief. And it further increased his respect and admiration for Graham. (Zuckerberg eventually asked the publisher to take a seat on the Facebook board.)
Facebook entered a new kind of boom phase, hiring staff, adding new features like photo sharing, and attracting millions more users. But Facebook was not yet a real business, especially given Zuckerberg's disdain for intrusive advertising, so it was burning quickly through its capital at the rate of about $6 million a year. That failed to discourage the delegates from corporate America, who continued to enhance their temptations. Zuckerberg kept huddling with the moguls, which gave rise to grumbling at Facebook, especially among the growing number of executives whom Silicon Valley recruiter Robin Reed was bringing onboard. What did all these meetings mean, they wondered? Zuckerberg wasn't bothering to explain his thinking. He thought of these meetings as a learning process. Reed had become a close observer of all the unhappiness, partly because she had one of the only private offices at the company. Zuckerberg wouldn't listen, Facebook staffers said. Zuckerberg should be replaced. Zuckerberg didn't know what he wanted to do with the company.
Finally Reed reached the end of her rope. "The team was almost ready to mutiny," says Reed. She arranged to meet with Zuckerberg on his way back from an East Coast meeting. But his plane was delayed, so when they finally met it was at 2:30 a.m. in the neon glow of a diner. Reed unleashed her frustration. "Mark, nobody knows what's going on. If you want to sell your company, then stop dicking around and say you want a billion dollars. If it's 2 billion, say that. If you don't want to sell, then say that!"
"I don't want to sell the company," Zuckerberg answered.
"Then stop taking all these meetings! You're sending the wrong message." Then she unleashed her final barrage. "You'd better take CEO lessons or this isn't going to work out for you!"
"So now you're finally being straight with me," Zuckerberg replied, turning more animated. "This is the first time I feel like you're telling me what you really think." Over the next few weeks Reed noticed a distinct change in Zuckerberg. For one thing, he did agree to start seeing an executive coach to get lessons on how to be an effective leader. The week after the confrontation he called the entire staff together for Facebook's first all-hands meeting.
While the talks with Viacom eventually fell apart over the structure of the deals, other offers kept coming and reached numbers that Zuckerberg had trouble dismissing out of hand. In July 2006, Yahoo CEO Terry Semel offered to buy Facebook for $1 billion cash. Zuckerberg seemed more than relieved a few weeks later when Yahoo (YHOO, Fortune 500), its stock suffering, reduced its offer to $850 million. As soon as he heard, a grinning Zuckerberg strode over to Moskovitz's desk a few feet away and gave a big high-five. The deal was off.
As all this was underway, executives at other media and tech firms were starting to ask if they ought to buy Facebook. Microsoft CEO Steve Ballmer had flown to Palo Alto to visit his young counterpart twice. As Zuckerberg is wont to do, he took Ballmer on a long walk. Zuckerberg told Ballmer that Facebook was raising money at a $15 billion valuation. But Ballmer had come with something more sweeping in mind. "Why don't we just buy you for $15 billion?" he replied, according to a very knowledgeable source. Zuckerberg was unmoved even by this offer. "I don't want to sell the company unless I can keep control," said Zuckerberg, as he always did in such situations. Ballmer took this reply as a sort of challenge. He went back to Microsoft's headquarters and concocted a plan intended to acquire Facebook in stages over a period of years to enable Zuckerberg to keep calling the shots. But Zuckerberg rejected all the overtures. What Ballmer finally agreed to instead was an advertising deal that included a provision for Microsoft (MSFT, Fortune 500) to pay a huge amount, $240 million, for a sliver of Facebook, 1.6%. Microsoft's investment gave Facebook an implied value of $15 billion.
Since then the company has reached another level of dominance, where the most passionate buyers are likely to be the public when the company eventually launches an IPO. Facebook expects to become profitable this year and bring in close to $2 billion in revenues. Zuckerberg owns about 24% of the stock, which puts his stake at almost $5 billion. But he seems in no rush for an IPO or the next big thing. After all, what would he do all day? "Unless I feel like I'm working on the most important problem I can help with, then I'm not going to feel good about how I'm spending my time," he says. "And that's what this company is." The ultimate payday is not a priority. Changing the world is.