In Washington D.C. 1974, Benjamin Franklin Gates is a descendant of a long line of treasure hunters. His grandfather John Adam Gates tells a story to him as a child about a secret entrusted to his ancestor Thomas Gates from Charles Carroll, the last surviving signer of the Declaration of Independence. Before his death in 1832, Charles confided an old clue – The secret lies with Charlotte – to Thomas that could lead to a fabled treasure hidden by the Founding Fathers of the United States and Freemasons during the American Revolutionary War, and sworn to find it and protect the family name. However, Ben's father, Patrick Henry Gates, tries to discourage Ben from following in the family line, as he had spent over 20 years looking for the treasure, attracting ridicule on the family name. Ben yet dedicated himself to find the treasure as he grew up to become a historian and cryptologist.
In present day, Ben discovered the Charlotte refers to a lost Colonial ship that is buried in the Arctic Circle ice. With an expedition funded and led by Ian Howe, Ben and his friend Riley Poole a computer expert, they successfully track down the Charlotte. Aboard the ship in the cargo hold they discover a skeletal captain guarding a barrel, inside is a meerschaum pipe with a Templar symbol riddle engraved on the stem that Ben connects to an invisible map transcribed by Timothy Matlack on the back of America's most sacred document – the Declaration of Independence. Of course authority is not just going to permit the analysis. When Ian (whose ancestor possibly could be Richard Howe the admiral who led the British navy) reveals he will go to any lengths to find this treasure including stealing the Declaration, Ben takes a stand against him. A fight ensues, during which spilled gunpowder is ignited. Ian escapes the ship, leaving it to explode before departing with his team. Ben and Riley are trapped inside but survive the explosion by hiding in a smuggler's hold, and return to the United States determined to stop Ian.
Ben and Riley try to warn the FBI, and Dr. Abigail Chase at the National Archives, they dismiss their claims, considering the Declaration impossible to steal. Ben thinks otherwise, and also decides to steal it to protect it from Ian. Ben and Riley create their own plan to steal the Declaration while it's in the Preservation Room during a gala event where there's less security: Ben sneaks in using a fake name, he gave Abigail one of George Washington's campaign buttons as a gift which was dipped in invisible ink, enabling him to access the finger-scan elevator; figures out her password is "Valley Forge" while Riley hacks into the surveillance cameras, and enters the Preservation Room obtaining the Declaration, just before Ian and his own team arrive. Abigail, suspicious of Ben's presence at the gala, becomes caught up with Ben, and Ian kidnaps her. Ben and Riley engaged in a car chase to rescue her as they escape from Ian by giving him a souvenir copy of the Declaration, and the authorities. Ben's identity, however, is tracked to the theft control by the FBI led by agent Peter Sadusky, because he had to use a credit card to purchase the souvenir, and they are forced to go to his father's home, much to Patrick's surprise and dismay.
Ben and Abigail drawn out the invisible ink with lemon liquid & heat and found an Ottendorf cipher on the back of the Declaration which, using the riddle from the meerschaum pipe, they correspond to the Silence Dogood letters written by Benjamin Franklin. Ben had digital scans of the letters but is no avail with the FBI arriving and inspecting his apartment room. So he asks Patrick to hand him the original letters which he should have; unfortunately, he has donated the letters at the Franklin Institute in Philadelphia. Ben and his team leave for Philadelphia immediately.
Decoding the message at the institute, Pass and Stow, it points to where the Liberty Bell once stood, before it was replaced with the Centennial Bell at Independence Hall atop of the steeple at the specific time 2:22 that is shown on the back of a $100 bill. Thought to have missed the time, Riley corrects them that daylight savings wasn't established until World War I, so the trio go to Independence Hall where the building's shadow touches a brick wall at 3:22. Ben found a hidden cache containing a pair of spectacles invented by Benjamin Franklin that reveal additional clues on the back of the Declaration, Heere at the Wall. Ben felt sentimental for a moment since the last time the Declaration was in the Assembly Room it was being signed. The group is caught by Ian, and even though they split up, Riley and Abigail lost the Declaration to Ian, while Sadusky captures Ben still with the glasses.
Abigail contacted Ian to deal him into rescuing Ben from the FBI in exchange for the next clue. Ian lures the FBI into a sophisticated trap aboard the USS Intrepid, allowing Ben to escape into the Hudson River and retrieve him due to his skills as a former U.S. Navy Diver. Abigail's plan to make sure Ian will let them go if after he gets the clue is undermined; however Ian reveals that they have captured Patrick. The clue led the group to street intersection Wall Street and 79 Broadway at Trinity Church in New York City. Holding Riley, Abigail, and Patrick hostage, Ian coerces Ben to use the glasses to look again on the back of the Declaration. Inside the church, Ben reexamines the document and discovers another clue, Beneath Parkington Lane.
Beneath the church through a secret tunnel behind the coffin of Master Mason Parkington Lane, they find an enormous shaft with an old elevator dumbwaiter system. When walking down the staircases the shaft began to collapse due to rotten wood, but manage somehow. At the bottom of the shaft, they find a room lit only by a lantern, which Ben and Patrick asserts that it refers to Paul Revere's Ride, and indicates the treasure to be at the Old North Church in Boston. Ian and his men strand Ben, Riley, Abigail, and Patrick as they ascend to the surface, unaware that they have purposely given them a fake clue. Ben presses a button engraved on the wall of the "unfinished pyramid the all-seeing eye" and opens a secret passage to an empty room, much to their disappointment. Patrick sympathizes with Ben and admits that the treasure is real. They comprehend a secondary exit must have been built for air and in case of cave-ins. Ben examine the walls and found a familiar carving notch that uses the pipe from the Charlotte fits to open it. This unlocks yet another secret passage into the true treasure chamber: a secret temple of the Masons—containing scrolls from the Library of Alexandria, valuable metals, Egyptian artworks, and other vast artifacts from all periods of history, which the Gates family had been searching for 180 years, as well as a route to the surface! When the four ascend back to the church, Ben calls in Sadusky, and learns that he is a Freemason. Ben and Sadusky arrange a deal: with the safe return of the Declaration and identifying where Ian and his men can be found, Sadusky will give them all a pardon; the treasure shall be distributed among museums throughout the world (e.g. Smithsonian, Louvre, and Cairo), with Abigail not being penalized for the theft of the Declaration, and the entire Gates family and Riley will receive credit for the discovery. Ian Howe and his men are captured by the FBI at the Old North Church and charged with kidnapping, attempted murder, and trespassing on government property.
Ben chose to accept from the US government only a 1% finder's fee for himself and his team. That is still enough to make him and his friends quite wealthy. In addition, Ben has begun a romantic relationship with Abigail and bought a mansion once owned by a man who knew Charles Carroll they will be living in, and Riley bought himself a Ferrari. Abigail gives Ben a map and when he curiously asks what it leads to she just smiles a suggestive grin.
Before the movie got it's rating, it was slated to release under the Touchstone Pictures banner (which is part of Disney). After it got the rating, which is PG, it was released under the Walt Disney Pictures banner, as it is clear that it is a more family-friendly movie.