In 1938 Egypt, a team of archaeologists is searching for a tomb and its treasure. The team leader’s son falls into it, calling to his father and the team; they discover a significant artifact, the tablet of Ahkmenrah. The locals warn them that if they remove the tablet, “the end will come”.
In present-day New York City, night guard Larry Daley and his favorite exhibits at the American Museum of Natural History, Theodore Roosevelt, Attila the Hun, Sacagawea, Dexter the Monkey, miniatures Jed and Octavius, and Pharaoh Ahkmenrah, which come to life every night, are hosting the reopening of the Hayden Planetarium. The museum has a new wax figure Neanderthal resembling Larry named Laaa. Ahkmenrah shows Larry that his tablet is corroding, which has adverse effects on the exhibits: they go berserk during the event, causing panic. Larry goes home to find his son Nicky throwing a party. Nicky isn’t so sure about college and he wants to take a year off to plan his own future.
Larry discovers that former night watchman Cecil Fredericks was the boy who found the tablet in 1938. Larry visits Cecil and explains what’s going on at the museum. He realizes that the locals’ warning that “the end will come” meant that the tablet’s magic would end, and mentions that Ahkmenrah’s parents were sent to the British Museum. Recalling that Ahkmenrah said his father knew the tablet’s secrets, Larry knows he must consult them and persuades a now-unemployed Dr. McPhee to let him take Ahkmenrah and his tablet to London.
Larry and Nicky travel to the museum, and the security guard Tilly lets them in. When Larry enters, he sees his exhibit friends also came along. Laaa is instructed to stand guard while the others search for Ahkmenrah’s parents. They encounter a Triceratops skeleton and a Xiangliu statue along the way, but a deluded wax figure replica of Sir Lancelot helps them fight off both exhibits. Meanwhile, Jed and Octavius fall into a ventilation shaft, landing in a Pompeii exhibit just before the model of the volcano Mount Vesuvius erupts. Dexter, whom Larry sent to find them, appears and stops the volcano’s flow to save them.
The gang finds Ahkmenrah’s parents, and his father, Merenkahre, reveals the tablet was meant to keep his family together forever and is endowed with the power of Khonsu, God of the Moon, and needs frequent exposure to moonlight to retain its magic, otherwise, it will wane, and all the exhibits will die. Lancelot steals the tablet, mistaking it for the Holy Grail, then leaves for Camelot. The gang tries to stop him from escaping, but Tilly catches Larry and Laaa and locks them in the employee break room until Laaa head-butts the door open. The gang leaves the museum to search for Lancelot while Laaa stays behind to keep Tilly in her booth, and they become attracted to each other. The Trafalgar Square lion statues corner them; Larry distracts the statues with his flashlight and the search continues.