The Doctor and Amy Pond, following a message from River Song, arrive in Roman Britain on Earth in 102 AD, where they find River posing as Cleopatra. River shows the Doctor a Vincent van Gogh painting titled The Pandorica Opens, which depicts the TARDIS exploding. River had recovered the painting in the 52nd century and travelled to the time-space coordinates on the painting using a time agent's vortex manipulator. The Doctor realises the "Pandorica", a fabled prison for the universe's deadliest being, must be stored in a memorable location near the coordinates: Stonehenge.
At Stonehenge, the Doctor, Amy, and River find a passage to an underground area. Inside, they find the Pandorica, a giant metal box outfitted with every type of lock imaginable. While examining the Pandorica, Amy confronts the Doctor about an engagement ring she had previously found in the pocket of his jacket and feels a strong emotional attachment to; he says that it belonged to a "friend", and that nothing is ever truly forgotten. The Pandorica is transmitting a signal amplified by Stonehenge's rocks across the universe, and River warns the Doctor that the signal is drawing "everything that ever hated [him]" to Earth that night. The Doctor is aided by a volunteer group of Roman legionaries; the centurion in charge of them is revealed to be Amy's fiancé Rory. Neither Rory nor the Doctor can explain Rory's presence, as he was consumed by a crack in the universe during the events of "Cold Blood" and erased from existence. When Amy comes around after being knocked out by a damaged Cyberman, she does not remember Rory, which upsets him greatly. The Doctor assures Rory that Amy will remember in time, and hands him the engagement ring.
The Doctor's enemies begin to orbit overhead, and the Doctor buys himself additional time with a threatening speech. He urges River to bring the TARDIS to Stonehenge while he, Amy, Rory, and the legionaries prepare. When River tries to use the TARDIS, an outside force takes control of it and pilots it to Amy's house in the present day. After River leaves the TARDIS, the scanner screen cracks in the same shape as the cracks in the universe and a menacing voice says: "Silence will fall." River discovers landing patterns in Amy's garden and sees that someone has broken into the house. She finds in Amy's room a story book about Pandora's box and a children's book about Roman Britain. River communicates this to the Doctor, warning him that the Pandorica must be a trap, created out of Amy's memories. River identifies her current space-time coordinates—26 June 2010, the date the Doctor identified as the onset of the time energy explosion that caused the cracks in the universe ("Flesh and Stone"). The Doctor warns her to leave immediately, but she finds herself again trapped in the TARDIS as the central control console begins to go critical.
Back at Stonehenge, the Doctor discovers that the volunteer legionaries, including Rory, are Autons, and he is quickly captured as his other orbiting foes materialise around him. Above ground, as Rory fights to retain his human identity, Amy suddenly remembers him, but as his Auton identity emerges he unwillingly shoots and kills her. The Doctor struggles against his captors, who reveal that they have formed an alliance to imprison him in the Pandorica. They believe the Doctor caused the time energy explosion that caused the cracks that will destroy the universe, despite the Doctor's insistence that the TARDIS is responsible. As the Doctor is sealed into the Pandorica, explosions surround the Earth in space before everything fades to black and silence.