After being dumped by his girlfriend, embittered Harvard student Mark Zuckerberg (Jesse Eisenberg) creates a computer program that allows male students to rate the attractiveness of their female counterparts. With the help of best friend Eduardo Saverin (Andrew Garfield), Zuckerberg's 'Facemash' is a hit, and, although it gets him in hot water with the prestigious university's top brass, wealthy twins Cameron and Tyler Winklevoss (both played by Armie Hammer) seek him out to design their 'Harvard Connection' networking site.
Nonplussed by the Winklevoss brothers, Zuckerberg goes to Saverin with an idea for his own site, 'thefacebook', which the two quickly implement on campus. A runaway success with Harvard students, the lovelorn Zuckerberg is compelled to expand its reach when he finds that his ex, Erica Albright (Rooney Mara) hasn't heard of the site.
As 'the facebook' begins to spread like wildfire throughout the US, the Winklevosses decide to sue the increasingly wealthy Zuckerberg, alleging that he stole their idea. Meanwhile, rifts begin to appear between Zuckerberg and Saverin, a problem further exacerbated when Zuckerberg brings smooth-talking Napster mogul Sean Parker (Justin Timberlake) on board.