The movie opens with Emily Cale (Joey King) waking up to a breaking news alert on her phone. The president is set to enter negotiations for a peace treaty with the Middle East. As this happens, Emily looks out her bedroom window to spot choppers flying over the area.
President James Sawyer (Jamie Foxx) is traveling with Special Agent Carol Finnerty (Maggie Gyllenhaal) on their way back to the White House. Sawyer requests that the pilot changes the route so they can do "the thing" - flying over the Reflecting Pool next to the Lincoln Memorial. Sawyer tells Finnerty a fact about Lincoln being the first president to be in favor for women's voting, a fact that he happens to mention every time they do "the thing".
We meet John Cale (Channing Tatum), a U.S. Capitol officer, watching Sawyer address the nation with a speech on how poverty is the biggest problem in this country, alluding to a story in which his mother made dinner for a friend who attempted to stage a robbery. Cale starts arguing with a squirrel trying to get into a birdhouse as his employer, Speaker of the House Eli Raphelson (Richard Jenkins), walks out of his house.
Martin Walker (James Woods), head of the Secret Service, also watches the president's speech. He loads a gun, and then places an American flag pin next to a picture of a young man in a Marine uniform. It is his son Kevin, who was killed in the Middle East. Walker says goodbye to his wife Muriel (Barbara Williams).
While walking with Raphelson in the Capitol Building, John spots a young woman named Jenna (Jackie Geary) and asks her if she got him an interview with Finnerty, and she says yes. He also asks for another favor, to get White House passes for his daughter. Jenna says she'll see what she can do. When nobody is looking, a red-haired man named Conrad (Kyle Gatehouse) enters a room numbered 116.
Cale goes to pick up Emily from her home. She is pissed at him and doesn't speak to him, and her mother Melanie (Rachelle Lefevre) informs Cale that he missed her talent show a week ago, in which she twirled a flag. It's clear that Cale hasn't always been there for Emily, which is why she has so much animosity toward him.
Sawyer sees a reporter outside on the lawn, Roger Skinner (Andrew Simms), making comments against Sawyer's policies. Finnerty comes in and tells Sawyer his wife Alison (Garcelle Beauvais) is calling. They discuss his policies and the controversy surrounding them, but she is confident in him.
Conrad is now dressed as a janitor, and he enters a truck with a box inside. In it is a very large bomb.
On the ride to the White House, Emily is still not speaking to her dad until he shows her the passes. She suddenly becomes excited and begins spouting out White House facts. They arrive at the White House and get past security. Cale meets Finnerty, and they both recognize each other from college. She sees him for the interview with Special Agent Todd (Vincent Leclerc). From the interview, it is revealed that Cale served in Afghanistan and rescued Raphelson's son while he was out there. His records also indicate that he has a shameful credit score, a barely average GPA, and he is overall deemed unqualified due to his lack of authority. Although he tries to convince Finnerty otherwise, she dismisses him. Emily excitedly asks if he got the job, and he says he thinks he's got a shot, and he proceeds to take her on the tour.
Walker goes into a meeting with other members of the president's detail, and it is revealed that it is his final day on the job. The other agents bring in a cake for him decorated with sparklers.
Cale walks past a group of suspicious-looking guys dressed as home theater repairmen. He continues on the tour with a guide named Donnie (Nicolas Wright), who is surprised with Emily's knowledge of White House facts, and also a bit unsettled when she apparently reveals the location of the Presidential Emergency Operations Center. She gets super excited when she sees Sawyer coming in and asks him a question for her YouTube channel. She also introduces her dad and says he is on his detail, but Sawyer knows he lied to her. Donnie shows Cale an oil painting of the White House burning during the War of 1812 and mentions how it was rebuilt from scratch. Emily then leaves to go to the bathroom.
Conrad walks into the Capitol wheeling in a mop and bucket and then leaves it in the middle of the room. As the clock on his watch reaches zero, the bomb from earlier explodes massively within the building. Finnerty notices the explosion as she is driving away, and everybody in the White House is alerted. Several agents lock the place down, just as Cale tries to go searching for Emily. At the same time, Finnerty takes Raphelson away from the Capitol while Vice President Alvin Hammond (Michael Murphy) is put on Air Force One.
The repairmen reveal themselves to be a group of mercenaries led by Emil Stenz (Jason Clarke). They begin to wipe out nearly every agent in plain sight and take the tour guests hostage. Cale grabs a gun and manages to escape as a mercenary takes everyone in the room hostage. Emily, meanwhile, evades the mercenaries and manages to capture footage of Stenz and company on her phone.
Stenz welcomes in a hacker called Skip Tyler (Jimmi Simpson), who is set to get into the defense system. At the same time, Cale makes it to the bathroom but finds that Emily isn't there. A mercenary comes in and tries to shoot at him, but he takes him out with one bullet.
Walker leads Sawyer and his detail down to the PEOC, but then pulls his gun out and kills everybody, revealing himself to be a villain wanting revenge for the death of his son. Cale overhears Walker contacting Stenz over the walkie-talkie and finds out where they are. He kills a mercenary named Bobby (Patrick Sabongui) before running down to the PEOC. He shoots at Walker and gives Sawyer a chance to run out.
Tyler makes it to a computer room and begins the hacking process. He starts eating a lollipop as he waits for the firewalls to completely go down.
Finnerty takes Raphelson to a command center to meet with General Caulfield (Lance Reddick). They patch through to Hammond while he is on Air Force One, so he is aware of the situation. They contact Tyler, who patches them through to Walker. He demands a $400 million ransom from the Federal Reserve or he will execute Sawyer on the South Lawn.
Stenz finds Bobby's corpse and swears vengeance on Cale, furious because Bobby apparently saved his life twice. He and Walker get into an elevator, not knowing that Cale and Sawyer are right above them. Cale suggests they call in Seal Team Six to come in to take care of the villains, and Sawyer tells him that they have a satellite phone in the Residence. However, they need to get back above the elevator. Cale notices a mercenary getting into the elevator and sees that he is carrying javelin missiles.
Stenz and Walker locate the remaining chain of command. Stenz kills the Secretary of Defense and takes everybody else hostage, including Roger Skinner. As they lead them into the room with the other hostages, Emily continues capturing footage of them and uploading them to her channel. Her mother sends her a text message, and the ringtone is heard by one of the mercenaries. Emily tries to hide in a closet, but the mercenary knows she's in there and threatens to shoot if she doesn't come out. She gives herself up and is taken by him.
As Cale and Sawyer make their way to Residence, the two are attacked by more mercenaries, but Cale and Sawyer manage to kill them. Cale uses the satellite phone to get in touch with Finnerty to let her and everybody else know that Sawyer is safe, and she tells him to turn on the news. Emily's footage has made it onto the news, exposing the terrorists to the public. Cale sees it and panics. Melanie also sees the news and rushes over to the White House immediately. He is told by Sawyer and Finnerty that they can get out using tunnels that JFK used to sneak Marilyn Monroe in (originally rumored to be a myth).
Finnerty learns that Stenz and his team all originally worked for various government agencies. Caulfield reveals that Stenz was part of a paramilitary group in Pakistan, and when the Sawyer administration began, Stenz's operation was shut down, and he spent two years in prison.
Muriel Walker is called in to try and get her husband to stop what he is doing. Finnerty learns from her that Walker has an inoperable tumor the size of a golf ball, leading her to believe that this is a suicide mission. Although Muriel tries to talk her husband down, he assures her it is for their son. With that, she allows her husband to continue his mission, and she is taken away, where Finnerty implies she will be locked up in a federal prison.
Cale and Sawyer go underground through the tunnels, which Stenz and his goons find out about. The gate to the tunnel is rigged with explosives, and they run out and manage to find the presidential limo. Stenz finds them and tries to shoot them, but they escape and are chased by the villains. Cale tries to run through the West Gate, but Sawyer tells him they wouldn't make it. Cale circles around the lawn and fountain to avoid the mercenaries. Sawyer grabs a rocket launcher and fires at the gate, blowing it open. Meanwhile, the terrorists use their own launcher to fire at the limo. When one mercenary brings out Emily in plain sight for John to see, he is distracted long enough for a rocket to hit the limo, sending it flying into a nearby pool. Stenz and Walker arrive on the scene. Cale and Sawyer make it out of the pool and try to get the villains with a grenade, but they miss. One mercenary tries to shoot at them with a minigun as they run into a pool house. He hits a boiler, causing a massive explosion that is caught on camera. The media interprets this as Sawyer being killed. With that, Hammond is sworn in as the president.
Cale takes Sawyer somewhere safe to treat a wound he sustained in the explosion. They chat about their daughters, since Cale knows Emily is crazy about Sawyer.
Hammond orders a special forces unit to go into Washington to take back the White House. Cale contacts Finnerty to pull them back as they are coming in high and warning them about the javelin missiles. He rushes out, just as the mercenaries begin to successfully shoot down the choppers. Cale makes it to the roof of the White House and begins to duke it out with Stenz. The special forces soldiers try to stop Stenz as Cale holds him, but Stenz shoots their chopper down as well. It comes crashing down and nearly kills the hostages, just barely missing them. Cale manages to bring himself and Stenz down through a glass ceiling, outrunning him but dropping his White House passes behind. This lets Stenz know Emily's identity and her relation to John.
Tyler finishes his upload as the last firewall comes down. He hacks into NORAD's weapons system and launches a missile into the sky, which hits Air Force One, sending it hurtling toward the ground and killing everybody on board. With that, Raphelson is now sworn in as president. His first act is to initiate an air strike on the White House to stop the terrorists once and for all. He is also given new presidential codes.
Stenz brings Emily into the Oval Office where Walker is. The villains get on the intercom and order Cale to stand down, or Stenz will shoot Emily in the stomach. Hearing this, Sawyer turns himself into them. Cale calls Finnerty and learns that he only has barely eight minutes before the air strike happens.
Walker pulls out a nuclear football for Sawyer to activate, which would allow them to launch nuclear attacks against several cities in the Middle East. Walker wants to ensure that Iran doesn't try and use their own nuclear weapons anytime soon, but Sawyer refuses to activate the football, even at the expense of Emily's life, which she understands. Before Walker can kill her, the alarms go off as Cale starts a fire. The mercenary who took the hostages comes out and almost kills Cale, but he is bludgeoned to death by none other than Donnie the tour guide. Cale orders him to take the rest of the hostages outside. Elsewhere, Tyler tries to escape through a tunnel but is killed by a bomb that goes off. Stenz runs out to finally kill Cale while Sawyer stabs Walker in the back with a pen. Cale wraps a grenade belt around Stenz's neck and pulls the pins out, leaving him to blow up.
Meanwhile, Walker shoots Sawyer after managing to get him to activate the football. Emily furiously tries to fight Walker for what he's done, but he throws her off. He begins to enter updated codes from an unknown source, but before he can fully activate the launch, Cale crashes into the Oval Office with one of the terrorist's vans. With seconds to spare, Cale pulls out the minigun and pumps Walker full of lead as the launch sequence times out. Cale tells Emily to run out while he finds Sawyer, and she grabs the presidential flag and waves it just as the fighters come flying in. They realize she is trying to call off the attack, and although Raphelson doesn't call for the abort, they pull back. The crowd of people in front of the White House, including Melanie, cheer Emily on, and the media deems her a hero.
Cale finds Sawyer alive, as the bullet hit a pocket watch that belonged to Lincoln. Finnerty calls Cale, and she says this isn't over yet. She knows that the mercenaries weren't called in from Walker or Stenz. Cale knows who it is.
Finnerty and Raphelson arrive at the White House and meet with Cale, who tells them that Sawyer is dead. Raphelson says they will send the troops back to Iran since they may have heard about the planned nuclear strike and are seeking retaliation. This would also go against the proposed peace treaty. Cale reveals that he knows Raphelson was in the plan all along, and he used a pager to send the new codes to Walker, proving it by having Finnerty dial the call-back number. Sawyer comes out, and orders Raphelson to be taken into custody, saying this is a coup d'etat. Finnerty admits she was wrong about Cale. Sawyer boards his chopper and calls for Cale, addressing him as "Special Agent Cale". Cale invites Emily to join them, as she is now happy with her dad. On board, Finnerty tells Sawyer that the leaders of Russia, China, Iran, and France have agreed to the peace treaty.
The movie ends as the group flies away in the chopper, doing "the thing" for Cale and Emily to see.
You can send in your spoiler to other movies by going here.