Five days after the end of the Civil War, John Wilkes Booth and Michael O'Laughlen, both members of the Knights of the Golden Circle (KGC), enter a tavern and approach Thomas Gates to decode a message. Thomas recognizes the message as using the Playfair cipher and begins to translate it. While he does so, Booth leaves for Ford's Theatre to assassinate President Abraham Lincoln. Thomas solves the puzzle and realizes the men are still loyal to the Confederacy. A fight breaks out, and Thomas rips several pages from the diary and throws them in the fireplace. Thomas is shot, and the gunman retrieves only a page fragment.
Over 140 years later, Ben Gates is telling his great-great-grandfather's story at a Civilian Heroes conference. Black market dealer Mitch Wilkinson shows one of the 18 missing pages of John Wilkes Booth's diary, with Thomas Gates' name on it, convincing everyone that Thomas was not only a conspirator, but the grand architect of the Lincoln assassination. Ben sets out to prove the innocence of Thomas.
Using spectral imaging, Ben discovers a cipher pointing to Édouard Laboulaye hidden on the back of the diary page. He travels to Paris, where he finds a clue engraved on the torch of the scale model of the Statue of Liberty, referring to the two Resolute desks.
Ben then heads to London to look at the desk at Buckingham Palace with the help of his friend Riley Poole and estranged girlfriend, Abigail Chase. From the Queen's desk, he obtains an ancient wooden plank.
Meanwhile, Wilkinson broke into Patrick Gates' house and cloned Patrick's cell phone in order to track Ben's whereabouts. Wilkinson eventually obtains the wooden plank, but not before Ben manages to photograph the symbols carved into the plank.
At Ben's insistence, Patrick reluctantly asks his ex-wife and Ben's mother, Dr. Emily Appleton, for help in translating the symbols. She does so, but points out that some of the glyphs are partial, leading Ben to conclude another plank must be hidden in the other Resolute desk located in the Oval Office.
Ben and Abigail coax Abigail's new love interest, Connor, a curator for the White House, into letting them into the office to see the desk. Ben discovers that the second plank is missing, but he does find a stamp bearing the seal of the Book of Secrets. Riley tells Ben that the Book of Secrets contains documents collected by Presidents for Presidents' eyes only, covering such controversial subjects as the JFK assassination, Watergate, and Area 51.
Ben crashes the President's birthday party at Mount Vernon to convince the President to follow him into a secret tunnel under the House where he confronts him about the book; the President sympathetically warns Ben that his actions will be interpreted as an attempt to kidnap the President; Ben is now wanted for committing a federal offense.
Ben convinces the President to reveal the location of the book, which is at the Library of Congress.
In the book, Ben finds a picture of the missing plank from the desk and an entry by President Coolidge, who found the plank in 1924, had it destroyed, and commissioned Gutzon Borglum to carve Mount Rushmore to erase the map's landmarks in order to protect the treasure.
Ben, Riley, Abigail, and Patrick head to Mount Rushmore where they meet Mitch, who has kidnapped Ben's mother. Mitch helps them find the entrance of a cave containing the legendary native American city of gold, Cíbola. Once inside, they encounter several traps, and everyone gets separated. Eventually, they find the city of solid gold underneath Mount Rushmore. However, in order to leave the city of gold, one person has to stay behind to hold open the escape path. Mitch sacrifices himself, asking Ben to give him the credit for finding the treasure.
Ben clears his family's name with the discovery and is cleared of all charges when the President tells everyone that Ben saved his life. Ben also ensures Mitch receives joint credit for the find.