Silicon Valley is no stranger to dramatic stories. But New York Times columnist Nick Bilton uncovered a veritable soap opera when he started digging into the story of how Twitter came to be.

Bilton's highly anticipated book, "Hatching Twitter: A True Story of Money, Power, Friendship, and Betrayal," comes out Tuesday, just two days before the social networking site's even more highly anticipated IPO. In advance of the book release, Bilton sat down with AllThingsD's Kara Swisher for a video interview on how he reported the book.

Bilton says he conducted hundreds of hours of interviews, including 65 hours with Twitter founders Ev Williams, Biz Stone, Jack Dorsey, Noah Glass, and members of Twitter's board. He sifted through thousands of documents and emails, as well as the founders' own photos and blog posts to recreate Twitter's start-up days. What he found, Swisher says, reads like a murder mystery.

"The story of Twitter is not the story everyone thinks they know," Bilton says in the video. "It's been squished down and changed and moved around and retold in different iterations."

The Real Twitter Story

Oddly enough, the theme of the book, Bilton says, is loneliness. Twitter was supposed to be a technological innovation that connects millions of people around the world, but it had the opposite effect among the co-founders.

"They built this thing hoping they'd find connections and not feel alone," Bilton tells Swisher. "The real genesis of it was 'friendship' but [Twitter] was the catalyst that broke them all apart."

Among the most surprising findings in the book are the fact that Mark Zuckerberg tried to buy Twitter, and when that deal fell through, he tried to hire Jack Dorsey, who had been fired from the company. "The amount of people who tried to buy this company: Al Gore got Biz and Ev drunk one night. Ashton Kutcher, P Diddy. Everyone has tried," Bilton says.

The 'Forgotten' Co-Founder

As with any soap opera, the book's got a healthy amount of backstabbing, too. In an early excerpt released in New York Times Magazine, Bilton reveals that Dorsey once gave Williams an ultimatum, threatening to leave the company, unless Williams fired Twitter's oft-forgotten founder Glass. So Williams told Glass he could either accept a severance package or be fired outright.

"That night, a defeated Glass met with Dorsey at a nearby club, where they drank late into the night. At one point, as they stood at the bar to order another round of drinks, Glass confided his day's ordeal. Dorsey acted dumbfounded and blamed Williams," Bilton writes. "Two weeks later, [Glass] was forced out of the two companies he co-founded. Dorsey soon became chief executive of Twitter."

There's sure to be plenty more juicy details when "Hatching Twitter" comes out Tuesday. To watch the full video on AllThingsD, click here.