Democratic Congressman Cam Brady (Will Ferrell) of North Carolina's fictional 14th District is the incumbent, running for his fifth term unopposed. His campaign is damaged by the revelation of his affair with one of his supporters, when Cam accidentally leaves a sexually explicit voice message on a local family's answering machine.
The corrupt businessman brothers Glenn and Wade Motch (Dan Aykroyd and John Lithgow) use this opportunity to convince Marty Huggins (Zach Galifianakis), tourism director for the town of Hammond and son of one of their associates, Raymond Huggins, to run against Cam on the Republican ticket, as part of a plan to profit from dealings with a Chinese company. Cam at first underestimates Marty and humiliates him by playing a video biography highlighting potentially embarrassing aspects of Marty's life. The Motch brothers then hire Tim Wattley (Dylan McDermott) to be Marty's campaign manager. Wattley reinvents Marty as a successful entrepreneur and family man. Marty's popularity rises due to his effective campaign while Cam's is further damaged when he accidentally punches a baby when intending to hit Marty. Cam later runs a campaign portraying Marty as an Al Qaeda terrorist, and Marty exposes Cam as a fake Christian by asking him to recite the Lord's Prayer, which he fails to do. Cam attempts to restore his religious image by visiting a church of snake handlers, but he gets bitten by a snake. A video of the bite is leaked into the Internet and goes viral, increasing Cam's popularity.
When Cam's son plans to slander his competition for class president, Cam realizes he has set a bad example and visits Marty to make peace. While drunk, Cam tells Marty that he originally became a politician to help people, citing that as class president he had a dangerous, rusty slide removed from the playground. After Cam leaves, Wattley convinces Marty to call the police and report Cam for driving while drunk. Cam is arrested and his campaign is again damaged. Marty later airs a TV ad of Cam's son addressing Marty as "dad". Cam gets revenge on Marty by seducing his neglected wife Mitzi and recording the act. The released sex tape humiliates the Huggins family and causes Cam's campaign manager, Mitch, to abandon him. Marty retaliates by shooting Cam in the leg on a hunting trip, increasing his own popularity.
As the election nears, Marty meets with the Motch brothers and learns of their plans to sell Hammond to their Chinese business partner and turn the town into a factory complex. Marty realizes he has been used and rejects the brothers' support, leading them to defect to Cam's side. Marty meanwhile reconciles with his family.
On election day, Cam's victory appears certain until Marty exposes the Motch brothers' intent and promises to preserve Hammond if elected. Cam still wins and remains congressman due to rigged voting machines owned by the Motch brothers. While Cam gloats, Marty shows his large scars to Cam and reveals that he looked up to Cam in school for getting rid of the dangerous slide. Realizing he has strayed from his true objectives as a politician, Cam withdraws from the election and Marty wins by default. Cam earns back Mitch's respect, and Marty later appoints him his chief of staff.
Six months later, Marty and Cam expose the Motch brothers, who are called to appear before Congress. The brothers point out that everything they did is legal under Citizens United v. FEC, but they are arrested for their association with Wattley, who is actually an international fugitive.
Will Ferrell as Camden "Cam" Brady
Zach Galifianakis as Martin Sylvester "Marty" Huggins
Jason Sudeikis as Mitch Wilson
Dylan McDermott as Tim Wattley
Katherine LaNasa as Rose Brady
Sarah Baker as Mitzi Huggins
John Lithgow as Glenn Motch
Dan Aykroyd as Wade Motch
Brian Cox as Raymond Huggins
Karen Maruyama as Mrs. Yao
Grant Goodman as Clay Huggins
Kya Haywood as Dylan Huggins
Billy Slaughter as Dermot
Aaron Jay Rome as Intern Jason
Taryn Terrell as Janette
Josh Lawson as Tripp Huggins
P. J. Byrne as Rick
Thomas Middleditch as Travis
Tzi Ma as Mr. Zheng
Jack McBrayer as Mr. Mendenhall
Kate Lang Johnson as Shana St. Croix
Scott A Martin as Wes Talager
Steve Tom as Representative Ben Langley
Seth Morris as Confession Husband
Tara Copeland as Confession Wife
Nick Smith as Courtroom cameraman
John Goodman as Rep. Scott Talley
Cameos as themselves
Wolf Blitzer
Piers Morgan
Bill Maher
Chris Matthews
Dennis Miller
Lawrence O'Donnell
Joe Scarborough
The Miz
Mika Brzezinski
Willie Geist
Ed Schultz
Bachman & Turner
Uggie
Rob Mariano