In the Louvre, a monk of Opus Dei named Silas apprehends Jacques Saunière, the museum’s curator, and demands to know where the Holy Grail is. After Saunière tells him, Silas shoots him and leaves him to die. However, Saunière has lied to Silas about the Grail’s location. Realizing that he has only a few minutes to live and that he must pass on his important secret, Saunière paints a pentacle on his stomach with his own blood, draws a circle with his blood, and drags himself into the center of the circle, re-creating the position of Da Vinci’s Vitruvian Man. He also leaves a code, a line of numbers, and two lines of text on the ground in invisible ink.

A police detective, Jerome Collet, calls Robert Langdon, the story’s protagonist and a professor of symbology, and asks him to come to the Louvre to try to interpret the scene. Langdon does not yet realize that he himself is suspected of the murder.

After murdering Saunière, Silas calls the “Teacher” and tells him that, according to Saunière, the keystone is in the Church of Saint-Sulpice in Paris. The Teacher sends Silas there. Silas follows Saunière’s clues to the keystone’s location and discovers that he has been tricked. In a fit of rage, he kills Sister Sandrine Bieil, the church’s keeper and a sentry for the Priory of Sion. At the Louvre, Langdon meets Jerome Collet and Bezu Fache, the police captain, and realizes that the two policemen suspect him of the murder.

Sophie Neveu, an agent of the department of cryptology and Saunière’s granddaughter, arrives at the crime scene and tells Langdon that he must call the embassy. When Langdon calls the number Sophie gave him, he reaches her answering service. The message warns Langdon that he is in danger and should meet Sophie in the bathroom at the Louvre.

In the bathroom, Sophie shows Langdon that Fache is noting his movements with a tracking device. She throws the device out the window onto a passing truck, tricking the police into thinking that Langdon has escaped from the Louvre.

Sophie also tells Langdon that the last line in the secret message, “P.S. Find Robert Langdon,” was her grandfather’s way of alerting her: P.S. are the initials of her grandfather’s nickname for her, Princesse Sophie. Langdon thinks that P.S. might stand for Priory of Sion, an ancient brotherhood devoted to the preservation of the pagan goddess worship tradition, and to the maintenance of the secret that Saunière died protecting.

Langdon decodes the second and third lines in Saunière’s message: “Leonardo Da Vinci! The Mona Lisa!” Sophie returns to the paintings to look for another clue. The police have returned to the Louvre as well, and they arrest Langdon. Sophie finds a key behind the Madonna of the Rocks. By using the painting as a hostage, she manages to disarm the police officer and get herself and Langdon out of the building.

As Sophie and Langdon drive toward the Swiss bank identified on the back of the key, Langdon explains the history of the Priory of Sion and their armed force, the Knights Templar. He reveals that the Priory protects secret documents known as the Sangreal, or the Holy Grail. Langdon’s latest manuscript is about this very subject.

When Sophie and Langdon enter the bank, an unnamed security guard realizes that they are fugitives and calls the police, but André Vernet, the bank’s manager and a friend of Saunière’s, recognizes Sophie and helps her and Langdon escape. Sophie and Langdon figure out that the number left near Saunière’s body must be the account number that will open the vault. When they open the vault they find a cryptex, a message delivery device designed by Da Vinci and crafted by Saunière. The cryptex can only be opened with a password.

Vernet successfully smuggles Sophie and Langdon past Collet in the back of a locked armored car. Vernet turns on them, but they manage to get away with the cryptex, which Langdon realizes is actually the Priory keystone—that is, the key to all of the secrets the Priory holds about the location of the Holy Grail.

Langdon and Sophie go to the house of Sir Leigh Teabing, a historian, to ask for his help opening the box. Teabing tells them the legend of the Grail, starting with the historical evidence that the Bible didn’t come straight from God but was compiled by Emperor Constantine. He also cites evidence that Jesus’ divinity was decided by a vote at Nicaea, and that Jesus was married to Mary Magdalene, who was of royal blood, and had children by her. Teabing shows them the hidden symbols in The Last Supper and the painted representation of the Magdalene. He tells them that the Holy Grail is actually Mary Magdalene’s body and the documents that prove Mary’s blood line is related to Jesus. He says he thinks Saunière and the others may have been killed because the Church suspected that the Priory was about to unveil this secret.

As Langdon is showing off the cryptex, Silas appears and hits him over the head. Silas holds Sophie and Teabing at gunpoint and demands the keystone, but Teabing attacks Silas, hitting him on the thigh where his punishment belt is located, and Sophie finishes him off by kicking him in the face. They tie Silas up.

Collet arrives at the castle, but Sophie, Langdon, the bound Silas, Teabing, and his servant, Rémy, escape and board Teabing’s private plane to England. Sophie realizes that the writing on the cryptex is decipherable if viewed in a mirror. They come to understand the poem, which refers to “a headstone praised by Templars” and the “Atbash cipher,” which will help them arrive at the password. Langdon remembers that the Knights Templar supposedly worshipped the god Baphomet, who is sometimes represented by a large stone head. The word, unscrambled by the Atbash Cipher, is Sofia. When they open the cryptex, however, they find only another cryptex, this one with a clue about a tomb where a knight was buried by a pope. They must find the orb that should have been on the knight’s tomb.

Fache realizes that Teabing and the rest of them are in the jet. He calls the British police and asks them to surround the airfield, but Teabing tricks the police into believing that there is nobody inside the plane but himself. Then he goes with Sophie, Langdon, Rémy, and Silas to the Temple Church in London, the burial site of knights that the Pope had killed.

Rémy frees Silas and reveals that he, too, follows the Teacher. Silas goes to the church to get the keystone, but when he tries to force Langdon to give it up, Langdon threatens to break it. Rémy intervenes, taking Teabing hostage and thus forcing Langdon to give up the cryptex.

Meanwhile, Collet and his men look through Teabing’s house and become suspicious when they find that he has been monitoring Saunière. Over the phone, the Teacher instructs Silas to let Rémy deliver the cryptex. The Teacher meets Rémy in the park and kills him. The Teacher calls the police and turns Silas in to the authorities. As Silas tries to escape, he is shot, and he accidentally shoots his idol, Bishop Aringarosa.

Silas takes Bishop Aringarosa to the hospital and staggers into a park, where he dies. In the hospital the next day, Aringarosa bitterly reflects that Teabing tricked him into helping with his murderous plan by claiming that if the Bishop delivered the Grail to him, he would help the Opus Dei regain favor with the Church.

Sophie’s and Langdon’s research leads them to the discovery that Sir Isaac Newton is the knight they are looking for, the one buried by a Pope, because they learn he was buried by Alexander Pope. They go to Westminster Abbey, where Newton is buried. There, the Teacher lures them to the garden with a note saying he has Teabing. They go there only to discover that Teabing himself is the Teacher. Teabing suspected that Saunière had decided not to release the secret of the Priory of Sion, because the Church threatened to kill Sophie if the secret was released. Wanting the secret to be public knowledge, he had decided to find the Grail himself.

Teabing gives Langdon the cryptex and asks Langdon and Sophie to help him open it. Langdon figures out that the password is apple—the orb missing from Newton’s tomb. He opens the cryptex and secretly takes out the papyrus. Then he throws the empty cryptex in the air, causing Teabing to drop his pistol as he attempts to catch it and prevent the map inside from being destroyed. Suddenly, Fache bursts into the room and arrests Teabing.

The papyrus inside the second cryptex directs Sophie and Langdon to Scotland, where Sophie finds her brother and her grandmother. During the reunion, she discovers that her family is, indeed, of the bloodline of Jesus and Mary Magdalene. Sophie and Langdon part, promising to meet in Florence in a month. Back in Paris, Langdon comprehends the poem, which leads him to the small pyramid built into the ground in the Louvre, where he is sure the Grail must be hidden.