Bonnie and her mother are on a road trip to visit Bonnie's grandmother; Bonnie has brought Woody, Buzz Lightyear, Jessie, Rex, Mr. Pricklepants, Mr. Potato Head, and Trixie with her. In the trunk of the vehicle, the toys are watching a horror film on a portable DVD player. When the car gets a flat tire, Bonnie and her mother must spend the night at the Sleep Well roadside motel, as a tow truck cannot be sent out until the next morning.
Once Bonnie and her mother are asleep, her toys exit Bonnie's bag to explore the motel room, but Mr. Potato Head goes missing. At this point, Mr. Pricklepants begins to narrate ongoing events as if it were part of an actual horror film, considering himself an expert. The toys search through the motel for Mr. Potato Head, but several are taken by a mysterious creature, leaving only Jessie. In a bathroom, Jessie meets an action figure named Combat Carl, who was separated from his owner, Billy. Combat Carl urges Jessie to flee to her owner for safety, but she insists on trying to rescue her friends. The creature returns to take Combat Carl, then Jessie. The creature is revealed to be an iguana named Mr. Jones, owned by the motel's manager, Ron, who has trained Mr. Jones to steal unattended toys from motel guests so he can sell them in online auctions. Ron puts Jessie in the back room of his office, in a glass cabinet containing her friends, Combat Carl, and other stolen toys.
As morning approaches, someone buys Woody online and Ron packs him into a box. Jessie is sold soon after, but Ron is distracted by the arrival of the tow truck and Jessie is left on the counter. A delivery lady takes Woody's box out to her truck, and Combat Carl tells Jessie that their only hope to rescue Woody and escape is for Jessie to travel to the truck in a box. Terrified, Jessie insists that she cannot enter a box, but Combat Carl helps her gain confidence. Once inside the truck, she frees herself and Woody. They return to the office, where Bonnie and her mother are checking out. Mr. Jones attacks Jessie, but she manages to pull down a curtain, revealing the stolen toys to Bonnie and her mother, who threatens to turn Ron over to the police. Bonnie retrieves her toys, and the trip is resumed.
During the credits, Combat Carl boards the delivery truck with the remaining toys in hopes of returning to their owner, Billy. Two police officers later arrive to interrogate Ron, who attempts to escape by hijacking their police car but is forced to flee on foot after immediately crashing it into the motel sign; the officers initiate a manhunt for him.