In late 2003, 19-year old Harvard University student Mark Zuckerberg is dumped by his girlfriend Erica Albright. After returning to his dorm, Zuckerberg insults Erica on his blog and creates an on-campus website called Facemash, which allows users to rate the attractiveness of female students and uses pilfered photographs. He receives six months of academic probation after traffic to the site crashes parts of Harvard's network. Facemash's popularity attracts the attention of Cameron and Tyler Winklevoss and their business partner Divya Narendra, which leads to Zuckerberg working on their dating website called Harvard Connection.
Zuckerberg approaches his friend Eduardo Saverin with an idea for what he calls Thefacebook, an online social networking website exclusive to Harvard University students. Saverin provides $1,000 seed funding, and the site becomes popular throughout the student body. When they learn of Thefacebook, the Winklevoss twins and Narendra believe Zuckerberg has stolen their idea, while also stalling on developing their own website. They raise their complaint with Harvard President Larry Summers, who is dismissive and sees no potential value in either a disciplinary action or in Thefacebook website itself.
Saverin and Zuckerberg meet fellow student Christy Lee, who asks them to "Facebook me", a phrase which impresses both of them. As Thefacebook grows in popularity, Zuckerberg extends the network to Yale University, Columbia University and Stanford University. Lee arranges for Saverin and Zuckerberg to meet Napster co-founder Sean Parker, who presents a vision for the company very similar to that of Zuckerberg. He also suggests dropping the "The" from Thefacebook. At Parker's suggestion, the company moves to Palo Alto, with Saverin remaining in New York seeking advertising support. After Parker promises to expand Facebook to two continents, Zuckerberg invites him to live at the house he is using as the company headquarters.
While competing in the Henley Royal Regatta for Harvard, the Winklevoss twins discover that Facebook has expanded to Oxford, Cambridge and LSE, and they decide to sue the company for theft of intellectual property. Meanwhile, Saverin objects to Parker making business decisions for Facebook and freezes the company's bank account in the resulting dispute. He later relents when Zuckerberg reveals that they have secured $500,000 from angel investor Peter Thiel. However, Saverin subsequently sues when he discovers that the new investment deal allows his share of Facebook to be diluted from 34% to 0.03%, while maintaining the ownership percentage of all other parties.
The entire story is intercut with scenes from depositions taken in lawsuits against Zuckerberg and Facebook—one filed by the Winklevoss twins, the other by Saverin. The Winklevoss twins claim that Zuckerberg stole their idea, while Saverin claims his shares of Facebook were unfairly diluted when the company was incorporated. At the end, Marylin Delpy, a junior lawyer for the defense, informs Zuckerberg that they will settle with Saverin, since the sordid details of Facebook's founding and Zuckerberg's own callous attitude will make him highly unsympathetic to a jury. After everyone leaves, he sends a friend request to Erica Albright on Facebook, and refreshes the page every few seconds waiting for a response.
An epilogue reveals the following information: Cameron and Tyler Winklevoss received a settlement of $65 million, signed a non-disclosure agreement, and rowed in the 2008 Beijing Olympics, placing sixth; Eduardo Saverin received a settlement of an unknown amount and his name was restored to the Facebook masthead as a Co-founder of Facebook; the website has over 500 million members in 207 countries and is valued at 25 billion dollars; and Mark Zuckerberg is the world's youngest billionaire.