Jeff Gaffney (Zach Galifianakis) works in the human resources department at MBI, a technological development firm, while his wife Karen (Isla Fisher) works as an interior decorator. They love each other and their two kids but they find themselves tired of the mundanity of their lives.
After sending their kids off to a sleepaway camp, the Gaffneys meet their friends Meg and Dan Craverston (Maribeth Monroe and Matt Walsh). Meg has just sold the house across the street to a couple that hasn't even seen the place.
Jeff goes to work where he must mediate disputes between other employees. He doesn't have many friends besides Dan, and the others hardly respect him. At home, Karen is doing designs when she spots the neighbors moving in across the street. She becomes interested as she sees a handsome man and beautiful woman entering their new home romantically. Karen takes pictures and sends them to Jeff.
When Jeff gets home, he finds that Karen is talking to the neighbors, Tim and Natalie Jones (Jon Hamm and Gal Gadot). Tim gives Jeff a glass sculpture as a housewarming gift, and Jeff gives him an MBI stress ball in return.
The Gaffneys invites the Joneses over for a neighborhood party they call "Junetoberfest". Natalie surprises the guests with her dart-throwing skills. Tim goes into the Gaffney house, and Karen follows. She finds him in Jeff's den, though he claims he got lost looking for the bathroom.
At night, Natalie distracts the guards at MBI while Tim sneaks in there and goes onto Jeff's computer. He gets into the deleted emails and finds that somebody has a package and is ready to do something with it.
The next day, Jeff and Tim run into each other at an ale shop, and Tim invites Jeff to join him in getting Chinese food. He brings Jeff to a secret bar in a restaurant where they serve snake wine (as in, a wine bottle with an actual living snake in it). Tim's friend who works there pulls out a large black viper and cuts it up to serve the men. Jeff ends up getting bitten by the severed snake head and must have anti-venom administered. Meanwhile, Karen follows Natalie as she goes out. Natalie catches Karen at a clothing store as she is trying on lingerie. Although she knows she's been followed, she helps Karen find the right lingerie to impress Jeff.
Later at night, Jeff and Karen start to get intimate when she shows off her new lingerie. They accidentally knock over the glass sculpture and break it, revealing a device inside that Karen realizes was put to bug the Gaffneys for information. The two sneak into the Joneses house while they're out, and they see that the Joneses have files on Jeff and other MBI employees. Jeff accidentally hits Karen in the neck with a tranquilizer dart. They get out quickly, but Tim and Natalie later find that someone used the dart.
Jeff talks to his boss Carl Pronger (Kevin Dunn) about a potential problem within the company. They make arrangements to meet up. Jeff and Karen meet with Carl, but not long into their meeting, and Carl is shot in the head by a sniper. Tim and Natalie arrive on the scene and shoot at the assassins hiding in a warehouse. They order Jeff and Karen to join them. More assassins on motorcycles chase after the couples, with Natalie shooting at them. The assassins throw a bomb onto the Joneses' car, which Jeff pulls off and tosses, letting Natalie shoot it and blow the villains up.
The Joneses explain in less-than-certain terms that they are indeed government spies, and that someone in MBI is trying to commit treason. Jeff feels betrayed because he felt a bond with Tim, but Tim insists that he felt that bond as well.
When the couples return to their neighborhood, Jeff and Karen assume everything will be fine...and then the Jones house explodes.
Later, the lights go out in the Gaffney house, and when they go back on, they see that Tim and Natalie are still alive, and they have both Dan and Meg tied up with duct tape on their mouths. It is revealed that Dan was using Jeff's work computer to send emails to someone named Scorpion, and that he was smuggling microchips up his ass to sell to international arms dealers.
Tim and Natalie have Jeff and Karen go in as decoys to meet with Scorpion in his building to make a fake drop. First, Jeff and Karen have sex in the heat of the moment. They then go to meet with Scorpion (Patton Oswalt), who turns out to be a disgruntled employee from MBI. After Jeff blows their cover, Tim and Natalie must intervene. Karen grabs a knife and passes it to Natalie as they make out for a bit, leading to a showdown. The Joneses kill the assassins and head out a window with Karen to land in a pool. Jeff tries to talk to Scorpion, but he shoots at him, forcing Jeff to jump. Scorpion picks up a briefcase that he thinks has what he wants, but it's really a bomb that Natalie detonates, killing Scorpion and his goons.
The couples return home. Jeff and Karen offer to let Tim and Natalie stay with them, but they feel they must head elsewhere. They part ways.
Sometime later, Jeff and Karen are in Marrakech after hearing about it from Tim. Sure enough, they run into Tim and Natalie. They are staking out some men wearing fezes. Once again, Jeff draws attention to them so Tim and Natalie have no choice but to spring into action and start shooting. Jeff and Karen couldn't be more excited.