The film alternates between three different periods of time involving separate groups of people, leading up to their encounter at the Channel off the coast of Dunkirk, France. As such, the film follows a non-linear narrative.
The opening text reads that, during World War II, the British and French armies have over 400,000 soldiers stranded on Dunkirk as they wait for the miracle of a rescue, or until they die.
1. The Mole (One Week)
Six British soldiers are walking through the desolate streets of Dunkirk. They are looking through abandoned houses for food, supplies, and water when they are fired at by unseen German soldiers. Five of the men are killed except for one, Tommy (Fionn Whitehead). He escapes the gunfire and makes it to the beach, where thousands of British soldiers line the beaches waiting to be evacuated while a few hundred others of soldiers lay dead, scattered around the beach. Tommy tries to find a spot to relieve himself when he sees a young soldier, Gibson (Aneurin Barnard), burying another soldier in the sand. Tommy goes over to help him.
The other soldiers look up as German Stuka Ju.87 dive bomber planes fly overhead and start dropping bombs. Many men are struck and killed or wounded, and Tommy prepares to go down as well, but the bombs miss him.
Tommy finds a wounded soldier left for dead. He and Gibson pretend to be medics to carry the soldier on-board the ship tending to the wounded so they can be evacuated. They pass a group of French soldiers trying to get on but are being denied entry under orders. Tommy and Gibson are not allowed onto the boat with the injured soldier they carried, but they manage to hide out by the mole (the concrete structure separating the water) until the next vessel shows up for them. The boat they were attempting to board for is attacked by more German aircraft and sunk, but they save a soldier named Alex (Harry Styles) from being crushed.
Meanwhile, Commander Bolton (Kenneth Branagh) of the Royal Navy and Colonel Winnant (James D'Arcy) are standing by the docks to negotiate the rescue and safe return of the soldiers. They opt to use boats to bring them back but determine that the mole is their only viable way to the destroyers.
Tommy, Gibson, and Alex all gather on another British Red Cross vessel. They get a little bit of food and water. Alex meets Tommy and notices Gibson walking around looking uneasy. The boat is hit by a torpedo, and water begins to flood the lower decks. As the ship sinks, Gibson gets out of the ship and manages to open the hatch for Tommy, Alex, and a few other men to get out safely. They board a skiff back to the shore.
Back on the beach, the surviving British soldiers join up with a small group of Scottish soldiers heading to a boat within the tide. The British soldiers hide in there, but since they are technically on German land, they soon get hit by bullets from German soldiers using the boat as target practice. The bullet holes start to leak in water. Alex suggests they throw Gibson out to lighten the boat, going so far as to accuse him of being a German spy since he hasn't spoken the whole time, possibly to disguise his accent. Speaking for the first time, Gibson reveals himself to be French and that he took the uniform and tags off another soldier (the one he was burying) so he can be evacuated. The boat floats out of Dunkirk but soon starts sinking. The soldiers make it out, except for Gibson, who gets caught on something and drowns.
2. The Sea (One Day)
The Royal Navy starts taking over private boats in an effort to rescue the soldiers stranded at Dunkirk. A mariner named Mr. Dawson (Mark Rylance) takes his own ship with his teenage son Peter (Tom Glyne-Carney) as opposed to allowing naval officers to commandeer it themselves. The two are joined by their young helper George (Barry Keoghan), who assures Mr. Dawson that he can be of good use to them.
The boat passes a sunken British ship. They find a shell-shocked soldier (Cillian Murphy) in the water. Mr. Dawson asks his name, but the soldier is silent. George tries tending to him with some tea, but the soldier knocks it out of his hand. When the soldier learns from Mr. Dawson that they are headed to Dunkirk, the soldier desperately tries to take control of the boat from Mr. Dawson. The ensuing struggle leads to George falling to the bottom of the boat and hitting his head hard. Peter goes to tend to his wounds, while the soldier stops and sits quietly. George gradually starts to lose his eyesight. Peter tells his father, but Mr. Dawson says they have come too far to turn back for help.
3. The Air (One Hour)
Three Spitfire pilots fly over the sea to provide air support to the troops. The squadron leader, plus pilots Farrier (Tom Hardy) and Collins (Jack Lowden), spot ME 109 German fighter planes in the sky and go after them. One of the Germans shoots down the squadron leader, leaving Farrier and Collins on their own. Farrier's fuel gauge is broken, so he does his best to preserve fuel and take the enemy plane down.
Collins' plane is shot down, and he heads down to the water. He tries to break himself free from his cockpit, but with the cockpit jammed and flooding with water, he nearly drowns. Collins is broken out by Peter, as his father's boat has managed to reach him in time. They bring Collins on-board. From his later conversation with Mr. Dawson, we learn that Peter's older brother was an RAF pilot who died in the early weeks of the war.
By this point, all groups come together on the waters.
More private British boats show up on the waters to rescue the soldiers. The soldiers spot a minesweeper and head toward it until it is hit by one of the German bombers. The water fills with oil as the soldiers swim past it and get covered in it before it is ignited, killing several men. Farrier manages to shoot down the attacking German Do.17 bomber as he runs out of fuel and heads toward the beach to make a safe landing. Meanwhile, Peter, Collins, and the shivering soldier pull as many men onto the boat as they can, including Alex and Tommy. Alex points out to the Dawsons that George is dead. The nameless shell-shocked soldier, unaware that George has died, asks Peter if George will be okay. Peter lies, saying that he will be.
After taking out another German bomber before it can destroy the mole, Farrier lands his plane slowly by the shore. He sets his plane on fire and is soon captured by German soldiers.
The Dawsons return home following the rescue. Peter gets a picture of George and takes it to the local paper, so that the boy may be remembered as a hero.
Bolton and Winnant mention having saved 338,000 men after only planning to rescue 30,000. Bolton stays to make sure the French can evacuate. He sees Winnant and the last of the British army off.
In England, the British soldiers are sent home on a train. Alex thinks that they will be met with scorn upon returning for this defeat. He sees a newspaper with a message from Winston Churchill regarding the evacuation and, unable to handle the scorn, asks Tommy to read it. As Tommy reads it upon entering the station, a man approaches the window and hands Alex two beers. Other people welcome the soldiers back with applause. Tommy finishes reading Churchill's statement, which commends the bravery and efforts of the soldiers and the miraculous escape they just participated in. However, the quote goes on to remind the public that evacuations alone do not win wars but concludes with the vow never to surrender.