Larry is newly divorced and having trouble holding down a steady job. In an effort to be a good role model to his son, Larry submits resumes to various places, including the local museum. The museum's current security guard is retiring so he decides to hire Larry as his replacement. Larry ends up as the only night security guard in the museum. Through a turn of events, a strange artifact places an unusual power inside the museum, which brings the statues and figures inside to life.
Among some of the more unusual figures which come to life every night during Larry's watch is a skeletal tyrannosaurus nicknamed Rexy. Rexy is actually very friendly and behaves more like a dog than a meat eating dinosaur. There are also some miniature figurines which include an old west set with a cowboy named Jedediah, played by Owen Wilson. Jedediah is at war with another miniature set of figurines from the Roman army.
Larry often tries to play mediator in keeping the peace between the two sets of figurines. There is also a full sized figure of Theodore Roosevelt on horseback, who is played by Robin Williams. Teddy Roosevelt often provides advice for Larry in dealing with the situations which arise.
Amidst the fun and frivolity in the museum at night there is also mischief in the form of an annoying monkey who does not like Larry and a figure of Attila the Hun who constantly chases Larry through the museum. The movie also incorporates an underlying story involving the retired security guard and his two colleagues who were dismissed. It seems the trio have been planning to rob the museum of some of its more valuable artifacts.