The opening scene is set somewhere in Pakistan where terrorist mastermind and financier Aamir Barkawi (Alon Aboutboul) is reportedly responsible for a bombing in Europe. He is throwing a wedding celebration for his daughter at his compound. Barkawi talks with two of his sons about one of them finding a mole, a German agent, in one of their terrorist cells in Lebanon. When he learns that the mole had been killed, he tells his sons to be "absolute" with removing the threat (implying to not only kill the spy but kill the spy's whole family as well). As the celebration is underway, an informant working as one of the waiters leaves a text message to the United States government to Barkawi's location. The military located in Nevada launches a drone strike against it just as the informant leaves. The compound blows up, supposedly killing Barkawi along with his family.
Two years later.
President Benjamin Asher (Aaron Eckhart) and his top Secret Service agent/best friend Mike Banning (Gerard Butler) are jogging together near the White House in Washington (which is still recovering from the terrorist attack in the previous film). Mike returns home where it is revealed that he is currently expecting his first child with his wife Leah (Radha Mitchell). He is hoping to take some time off to spend time with his family and to finish setting up the nursery. She clearly becomes irritated by the number of security cameras in the room that he has installed.
In Yemen, we see Barkawi is still alive (but walking with a limp), and he meets with his son Kamran (Waleed Zuaiter). They begin to set in motion plans for revenge.
Back in Washington, Asher and Mike are both informed that the British Prime Minister James Wilson has recently passed away. They, along with Asher's staff, including now Vice President Allan Trumbull (Morgan Freeman) and Secret Service Director Lynne Jacobs (Angela Bassett), travel to London to join all the other world leaders for Wilson's funeral. Believing it to be heavily secured, they are proven wrong when several mercenaries under Barkawi's commands initiate an attack, starting with a bomb destroying the Canadian prime minister's leader's limo. Soon, the mercenaries disguised as royal guards and police officers begin opening fire on civilians and other world leaders. The female German chancellor is killed by two assassins at Buckingham Palace before they are killed. The Japanese prime minister and his driver are killed on a bridge when two suicide bombers blow up both support spans and allowing the bridge to fall into the river. The Italian prime minister is killed with his mistress while standing atop Westminister Abbey. The French president is killed in his boat when another suicide bomber sails a barge containing explosives close to the boat. At St. Paul's Cathedral, Mike takes Asher and Jacobs with him to safety while shooting the mercs in the street.
Quickly, the terrorists start to hit London's landmarks, including Big Ben and the Tower Bridge over the River Thames, setting off explosives that kill even more people. Mike, Asher, and Jacobs head into a chopper to safety. However, the terrorists launch Stinger ground-to-air missiles at the choppers, taking out the two security choppers before striking the presidential one. The presidential chopper crash-lands to the ground, resulting in Jacobs being fatally impaled. Before dying, she tells Mike to "make those fuckers pay". Mike and Asher then go on the run, while being chased by more assassins on motorcycles.
Back in Washington, the president's staff sits in horror, fearing that their friends are dead. Mike attempts to contact Trumbull and send a message to let them know that he and Asher are still alive. He and the president are forced to venture to an underground station and after killing the terrorists pursing them, walk on foot through one of the abandoned metro tunnels. As Mike and Asher are running through the tunnels, Asher notes that the terrorists want him dead, and if it must come down to it, he orders Mike to kill him. Mike reluctantly agrees.
Back in Washington, Trumbull and his staff receives a threatening call from Barkawi to let them know that he is out for revenge for the death of his family. They are informed that Wilson's autopsy report detected poison in his body, meaning he was intentionally murdered with the plan for all the world leaders to come together to be killed off.
With the city on lock-down, Mike and Asher run to the home of MI6 agent Jacqueline "Jax" Marshall (Charlotte Riley), whom Mike knows well. Jax gets onto her computer and learns that Barkawi is behind the whole plot. She plays back a message from Trumbull confirming that they received Mike's message and are sending help. On the security cameras, the three see several armed men arrive in what is supposedly the Delta team there to rescue Mike and Asher, until Mike notices that the men are not sweating despite wearing heavy gear. They realize that the terrorists intercepted their message and are there to attack. The terrorists storm in and fire on the three. Mike shoots some of them and manage to kill all of them, with some help from President Asher. Mike and President Asher then take a car and drive through the streets until they are again ambushed by more terrorists, leading to their car being rammed by a truck. Despite being dazed, Mike manages to shoot and kill one of the terrorists who tries to finish him off, but Asher is abducted by the rest of the terrorists who then escape.
Asher is taken to a private location where Kamran is setting everything up for him to be publicly executed. He punches Asher several times to make him suffer beforehand. Meanwhile, Mike is already on his way to rescue him with the real Delta team.
The terrorists set up the cameras and broadcast it to every network around the world, so it's shown around places like Times Square. Kamran tells Asher to say some final words. Kamran readies his machete to decapitate Asher until Mike bursts in and shoots all but Kamran. He engages in a fistfight with Kamran and lets him know that no matter how many times enemies try to attack America, they'll still be there in a thousand years. Kamran manages to make a run for it. Mike orders the Delta team leader to blow the place up. Mike takes Asher and they jump down a shaft as the place goes up in flames, killing Kamran and the surviving terrorists. The Delta team finds Mike and Asher and reports to the staff that they're alive.
Barkawi's compound is located in Yemen. Trumbull calls him to let him know that he's lost. Another drone strike is launched against Barkawi, and this time, he's taken out for good.
Mike returns home and is spending time with Leah and their newborn child. He's looking at the letter of resignation to Asher he'd previously written. On TV, Trumbull speaks regarding the recent events, leaving an inspiring message that America will prevail. This convinces Mike to delete the letter.