Larry Daley, former night guard at the American Museum of Natural History, now runs his own direct response television company that sells inventions based on his experiences. He returns to the museum, discovering most of the exhibits will be moved to the Federal Archives at the Smithsonian Institution and replaced with holographic information providers. The Tablet of Akmenrah is to remain in the museum, leaving most of the exhibits without the ability to come to life at night. After the exhibits are moved, Larry receives a phone call from the cowboy Jedediah that Dexter the monkey stole the Tablet and took it to the Smithsonian. Larry travels to Washington, DC, navigating his way to the archives with help from his son Nick while posing as a night guard.
Larry finds his friends trapped in their shipping container under attack from Akmenrah’s evil older brother Kahmunrah, accidentally activating the tablet and bringing the exhibits in the Smithsonian to life. Kahmunrah reveals his plans to use the tablet’s powers to conquer the world. Larry escapes, aided by General George A. Custer, who is captured, and then the adventurous Amelia Earhart, who becomes his travelling companion around the museum. The two evade Kahmunrah’s men, trapping them in the V-J Day in Times Square. Kahmunrah enlists fellow historical leaders, Ivan the Terrible, Napoleon Bonaparte, and Al Capone to help capture Larry and retrieve the tablet. Jedediah tries to help but is placed in an hourglass. Kahmunrah is unable to open the Gate of the Underworld with the tablet, sending Larry and Amelia off to translate it or Jedediah dies.
While searching for someone in the museum who can help, Larry and Amelia end up falling in love. They travel to the National Air and Space Museum, briefly encountering the statue of Abraham Lincoln at the Lincoln Memorial. Inside the museum, Larry grounds all of the aircraft and rockets from taking off, before a group of Albert Einstein bobbleheads inform him that the combination is the value of pi. Napoleon, Ivan, and Capone’s troops arrive, prompting Larry and Amelia to escape using the Wright Flyer. They crash the plane into the Smithsonian, where Kahmunrah uses the acquired combination to summon an army of bird-headed warriors. Lincoln crashes in through the window, frightening the warriors back into the Underworld.
Amelia gathers an army of allies including Larry’s friends and Custer, leading to a climactic battle. Larry obtains the tablet, banishing Kahmunrah back to the Underworld. Amelia flies Larry and the New York exhibits back home, giving Larry a final kiss before taking off in her plane, knowing she will become dust before reaching the Smithsonian. Larry sells his company, donating the money to the museum to renovate it, and the exhibits remain, capable of moving about in the day under the pretense of being animatronics. Larry is rehired as night guard and aids a woman who resembles Amelia.