On a steam train rolling across the desert, there is an explosion and one-eyed Bart pops out of one of the cars with some stolen loot. Sheriff Woody brings down Bart with his bullwhip, but one-eyed Betty appears and attacks Woody with a nun chuck, knocking the Sheriff off the end of the train. However, Betty and Bart’s triumph is short-lived, as Woody and Jessie now race after the train on her trusty horse Bull’s Eye. But Bart has a trick up his sleeve. He pulls out an electronic detonator and it is revealed that the bridge over a yawning chasm has been piled high with explosives. Bart presses a button and the railroad bridge collapses in the resulting blast. Woody and Jessie’s first concern is for the orphans aboard the train. A corvette races up with several space aliens in it. Betty and Bart jump into the car and it drives off. Jessie and Woody race ahead, and Woody jumps into the train engine cab. He pulls the brake lever, but not in time. The train plunges into the gorge. A blue light and a rocket blast signal the appearance of Buzz Lightyear, who lifts the train from the gorge, before it hits the ground. As Bart, Betty and the aliens race across the desert toward the border crossing, their car is split in half by a shot from Buzz Lightyear’s laser gun. As Jessie, Woody and Buzz attempt to capture the villains, Bart summons his Slinky attack dog, which protects them with an invisible force field. Woody announces that he has brought his dinosaur that eats force-field dogs. The dinosaur comes up from out of the ground and makes a trumpeting noise that causes the force field to quiver. Before the force field can be broken, a shadow looms from over head, and Evil Dr. Pork Chop appears in a giant pink flying pig rocket ship. Pork Chop pushes a button that says: Death By Monkeys, which releases a barrel of red plastic monkeys to attack the heroes. The giant pig rocket’s snout opens up, and Bart, now aboard the evil ship, is set to push a button marked with a skull and cross bones. But before any more mayhem can occur, it is revealed that the action has been generated in the imagination of Andy who has been playing in his room with his toys. Andy’s young life is shown through a series of video home movie moments, and then the screen goes dark. Buzz, Woody, Jessie, Betty, Bart and Pork Chop are now forgotten, jumbled together in a toy chest. The dinosaur peeks out of the chest and sees a group of plastic army men dragging a sock that obviously has something in it toward the toy chest. The toys drag the loaded sock into the chest and pull out the cell phone inside. The toys dial a number that rings the phone and brings a now 17-year-old Andy into the room to retrieve it. When he answers the phone and finds no one on the line, Andy closes the toy chest and leaves the room, completely ignoring the toys. Disappointed, Woody addresses the toys and reveals that Andy is going away to college and that this was their last shot at gaining his attention. Buzz tells them all to get ready for “attic mode.” The toy soldiers, however, make an escape out the bedroom window. It has been an honor to serve, but when the trash bags come out they know the toy soldiers are the first to go. The remaining toys are gripped with fear that they will be thrown away, but Woody buoys them up with the thought that they have been saved so far even though Andy has discarded other toys, and that they will likely be exiled to the attic where, if they are lucky, they will be ready to be played with by Andy’s own children in the future. But even as he cheers up his friends, Woody has doubts. He climbs to the top of Andy’s desk, surveys the room, and looks at a boyhood photo of Andy with his toys in better, younger days. The toys hear voices outside the room and scramble to get back into the toy box. Andy and his sister enter; she asks if she can have his computer, and he says no. His mother comes in with boxes and says everything he’s not taking to college is either going to the attic or the trash dump. Molly looks in the toy chest and asks her brother why he still has the toys, and reminds Andy that in three more days his room will be hers. But their mother tells Molly she’s not off the hook, and that she needs to decide what of her toys should be sent to the Sunnyside day care center. Mom asks Andy if he wants to donate his toys to Sunnyside or to sell them. He tells her they’re not worth anything, and she says he has three days to decide—anything that’s not in the attic will be thrown out. When his mom leaves the room, Andy takes one last look at the toys in the chest and then starts tossing them into a trash bag. But before he tosses his two favorites, Woody and Buzz, into the bag, he decides to throw Woody into his box to be taken to college. He tosses Buzz into the bag, ties it up, and takes it out. The other toys now realize they are separated from Woody and will be going to the dump. Woody starts to race after them, but discovers that Andy is only taking the other toys to the attic. Molly comes out of her room with her box of toys for Sunnyside, and Andy helps her with it, leaving his bag of toys at the foot of the attic stairs. The Attic stairs retract by themselves, pushing the bag of toys into the hall. Mom nearly trips over them, she picks up the bag to takes it to the trash. In a panic, Woody summons Buster, the family dog, to ride to the rescue, but Buster is now old and only rolls over on his side when Woody attempts to jump on his back. Mom sets the bag of toys on the curb, and the trash truck is only a few houses away. Woody leaps out the window and attempts to rescue them, but is too late. He chases after the trash truck, but at the next house the trash man pushes a switch, turning on the compacter that pushes the bag deep into the truck. However, much to his relief, Woody sees an upside down recycling bin moving on its own toward the garage of Andy’s house. The toys are safe for the moment, but they are upset because they believe Andy wanted to throw them away. Jessie sees the box headed for Sunnyside in the back of the family station wagon and urges the other toys to hop into the box. Woody arrives and tries to set the other toys straight about Andy’s true intentions. The toys say they need to move on, and before Woody and Buzz can figure out a plan to get them out of the box, Mom closes the station wagon door and heads off for Sunnyside. Although Woody tries to persuade the toys that day care is only for lonely old toys, the others seem to like the atmosphere at the center when they arrive. The box of toys is dropped off in the playroom, and the new arrivals are delighted to see kids playing with other toys. They try to get out of the box, but are afraid the old toys in the playroom will be jealous of the new arrivals. But the day care toys warmly greet the new arrivals. They receive a formal greeting from Lotso, a large purple stuffed bear. They ask Lotso if they’ll be played with, and he says all day every day five days a week. He also tells them that when the kids grow older, new kids come to take their place and the toys are never abandoned or forgotten. “No owners,” he tells them, “means no heartbreak.” He introduces them to Ken, who immediately becomes infatuated with Barbie. Lotso tells them they are now masters of their own destinies and shows them to the Caterpillar Room where they will be staying. Woody admits it’s nice at Sunnyside, but says they have to go back. The others urge him to stay and be played with, but he says No, he has a kid and they al have a kid. Buzz tells him their mission with Andy is over, and that they’ll all be together at Sunnyside. Woody opts to return to Andy’s house, and insists that Bull’s Eye stay with the others at Sunnyside. As he attempts to leave Sunnyside, Woody is nearly mowed down by a janitor’s cart. Grabbing hold, he is wheeled into a bathroom. He manages to escape through a window and onto the roof of the building—but he doesn’t know how to get down from such a height. His hat blows off, and he spies a fallen kite on the roof. He manages to fly away and land outside the grounds of Sunnyside, but a Gust of wind grabs the kite and thrusts it back into the air with Woody aboard. The kite breaks, and Woody plummets to the ground. He crashes through a tree and is only saved from smashing to the pavement because the “talking string” on his back catches in a branch. A little girl named Bonnie pulls him from the tree, puts him in her backpack, and takes him home. Woody’s cowboy hat is left behind. At Sunnyside, recess ends and the kids come in play very roughly with the toys. Buzz is tossed onto a windowsill and sees the kids in the next room playing respectfully with their toys, but it is only chaos in the Caterpillar Room. At Bonnie’s house, Woody is treated to a tea party. When the little girl leaves the room, Woody asks Bonnie’s toys where he is, but she returns before they can tell him. After closing at Sunnyside, they toys are bent, broken and exhausted. They think they should be in the Butterfly Room with the bigger kids, and Buzz says he’ll talk to Lotso about it, but the doors are locked. Buzz notices the transom is open and the toys rig a catapult to shoot Buzz through it. Buzz sees two monster/insect toys in the hallway. They grab Ken, who is talking with Barbie. Buzz follows the three into the top of a vending machine, where he observes that they are gambling. Ken asks the others what they think of the new recruits, and they reply: strictly landfill. They chide Ken about Barbie, but he insists that she’s different. As Buzz attempts to sneak away, he is caught and taken to the library. Asleep in Bonnie’s bed with the rest of her toys, Woody gets up and attempts to leave. He finds Bonnie’s address in her backpack, and her other toys agree to help. At Sunnyside, Buzz is tied up in the time out chair and demands to talk with Lotso. Although Ken refuses, Lotso enters. He agrees to Buzz’s request to be moved into the big kids’ room, but refuses to let the others come over. When Buzz decides to return to his friends, Lotso has him tied back up and calls for the bookworm. The bookworm tosses down the Buzz Lightyear instruction manual, and the evil toys use it to learn how to return Buzz to his original factory settings. Wondering what has happened to Buzz, Betty looks for him by holding out her remaining eye under the door and into the hallway. But there is confusion. With both eyes detached, she starts seeing with her lost eye which is back at Andy’s house. She learns that Andy had indeed intended to put them in the attic, and he is looking for them. As they decide to return home, Lotso enters and tells them they are not leaving. Potato Head Betty protests but he removes her mouth. When the toys ignore Lotso, Buzz appears—but it is a new Buzz—one programmed to keep the other toys in their place. After Buzz subdues them, Lotso tells him to lock ‘em up. As Lotso has Bart taken to “The Box,” Barbie enters and asks Ken what’s going on? She joins her friends in a cell, and the new Buzz tells them the rules—every toy is locked up at night, and anyone found out of his cell will spend the night in “The Box”—which is a sand box on the playground, covered at night. Lotso then lays down the law about how things are done at Sunnyside. Using Bonnie’s computer, Woody finds out how to get from Bonnie’s to Andy’s. As Woody starts to leave, he tells Bonnie’s toys that if they ever meet anyone from Sunnyside to tell them Woody’s gone home. Bonnie’s toys are astonished and ask him how he escaped from Sunnyside? They introduce him to Chuckle, a desperate looking clown doll who relates his experiences with Lotso when they were both owned by a young girl named Daisy. On a picnic with her family, Daisy fell asleep and her parents put her in the car and accidentally left her toys behind. Daisy never came back. They made their way back to Daisy’s house, but by the time they did she had a replacement bear, and Lotso snapped. Hitting the road, they found Sunnyside. Lotso set himself up as the boss of the Sunnyside toys. Woody is faced with a dilemma. He wants to go back to rescue his friends, but Andy will be leaving in a couple of days, and if he doesn’t return home he’ll never see Andy again. The next morning, Lotso releases Andy’s old toys for a play date with destiny. Having concealed himself in Bonnie’s backpack, Woody manages to get back into Sunnyside. He gets into the crawl space above the ceiling and makes his way to the Caterpillar Room and sees the little kids abusing the toys. The Toy phone comes in, rings and pops its handset off. Woody picks it up and is told that it was a mistake to come back, Woody asks for the phone’s help and is told about all the security measures that make it impossible to leave—especially “the monkey” who keeps tabs on the security cameras and sounds and alarm with his cymbals when he sees any toy trying to leave. The phone tells Woody if he wants to get out of there he must get rid of that monkey. Andy makes himself known to the toys and tells them there is one way to bust out. That night, while Ken, followed by Buzz Lightyear, takes role call of the toys in their cells, Woody looks on from hiding. When he calls “Potato Head” there is no answer, and when Buzz shakes the cage, only a real potato is in there. While potato head Bart diverts the attentions of the guards, Woody helps the slinky dog to escape without being seen by the monkey. Barbie, tearfully asks Ken to take her to live in his dream house and he agrees, leaving Buzz in charge. Woody and the dog manage to subdue the monkey. At the dream house, Ken shows Barbie his closet full of clothes and laments that no one appreciates clothes at Sunnyside. Barbie asks Ken to model some of his outfits for her. He puts on a fashion show. Woody and Slinky dog have managed to subdue the monkey by tying him up with tape. Woody grabs the key, and slinky sends a signal to Jessie, who in turn signals Pork Chop and Dinosaur to create a disturbance to distract the patrolling Buzz. Buzz goes to quiet them down, pulls out their cage and they tumble to the ground. Jessie manages to free herself from her cage and, with the aid of Bull’s Eye, drops a plastic tub over Buzz. As Jessie and Bull’s Eye slide a tortilla under the door, Bart’s dismembered hand grabs it and he reassembles himself as a “Mr. Tortilla Head.” Back in the dream house, Ken is still modeling for Barbie. When he pops out from behind his dressing screen, Barbie jumps him and demands to know what they did to Buzz. Woody and Slinky shoot the key across the floor and under the door to Jessie. Bart spies on Lotso, sees he is asleep, and signals the others the coast is clear. The trapped toys unlock the door and start to make their way across the playground. In an effort to torture Ken into talking, Barbie ties him up and starts ripping up his costumes one-by-one. He finally breaks when she starts to tear his 1967 Nehru Jacket, and Ken reveals that there is an instruction manual and Lotso has reprogrammed Buzz into demo mode. Dressed as Astronaut Ken, Barbie gets the instruction manual from the bookworm, who notices her high heels as she walks away. However, he merely thinks that Ken is a fetishist of some sort and returns to the book stacks. A pigeon lands and starts pecking at Bart. Bart falls in pieces, but he spies the Sunnyside vegetable garden. Buzz manages to escape and starts to sound an alarm, but he is tackled and the toys open up his back and try to flip the switch to restore him to his former self. They only succeed in turning him into a Spanish-speaking spaceman. The toys race across the playground and take refuge in an enclosed slide. Bart shows up as “Mr. Cucumber Head.” The toys return his proper plastic potato body, and then continue on their trek across the playground. Half of them make it to the wall, but Buzz, Bull’s Eye and the aliens are cut off by a passing patrol truck. They are discovered by the big baby, who is sitting in a play yard swing. The baby comes after them, but they manage to hide and avoid discovery. The baby’s attention span wanders as he wanders off. They manage to get to the trash chute, and climb inside. They slide down the chute and nearly land in the trash bin, but manage not to. They send Slinky to bridge the chasm of the trash bin, but as he does so, Lotso appears and shoves him back. The toys are surrounded by Lotso’s minions. Lotso repeats his standard mantra that the toys are better off at Sunnyside than at a home where they are not wanted, and threatens to put the toys in the dumpster if they don’t return to the Caterpillar room. Ken tries to intervene, and tells Lotso’s minions that Sunnyside could be a great place if it wasn’t for Lotso. Woody tells Lotso that Daisy only replaced him and that he lied to Big Baby and the clown. When she sees her ownership tag with Daisy’s name on it, Big Baby starts to cry. Lotso tells Octopus to throw the toys into the trash bin, but Big Baby picks up Lotso and throws him into the bin, and shuts the lid. The toys escape across the top of the trash bin lid, but one of the aliens is caught. Woody goes back to rescue him and succeeds, but Lotso manages to grab his leg from below as he attempts to rejoin the others. A Trash truck arrives and picks up the bin. The toys jump aboard the bin trying to rescue Woody and are dumped into the bin. The toys are in peril inside he trash truck as more trash is piled in. Buzz manages to rescue Jessie, and throws her to safety as a discarded TV set falls from above and lands on him. The toys lift the TV, find Buzz, and pull him out. At first they think he’s been damaged beyond repair, but he snaps back into being the old Buzz. At the landfill, the trash truck dumps its load. And then bulldozers start to rearrange the trash, again putting them in peril. They are shoved into a trash conveyor that leads to a grinder. They discover the roof of the conveyor tunnel is magnetic, to separate recyclable metal trash, and they grab metal objects and are pulled to the ceiling out of the reach of the grinder. But Lotso, pokes his hand up from the trash on the conveyor and calls for help. Woody and Buzz go to save him. Lotso is trapped under a golf bag, Woody uses a golf club as a lever to release Lotso. And the metal club carries them to the magnet and away from the grinder just in time. But just as they think they are safe, they realize they are headed toward a giant furnace. They try to run away, but it is clear that their effort is futile. However, Lotso notices a warning light and a stop button. He races to the button, but when he gets to it he turns into the evil Lotso again and asks them, “Where’s your kid now?” and walks away. The toys fall toward the furnace. Jessie asks Buzz, “What do we do?” He reaches out and takes her hand. Jessie, in turn, takes Bull’s Eye’s hand, and then they all join hands. They are together as they inch ever closer to the furnace. But a giant claw falls out of the sky and grabs them. They find that the aliens have operated the claw to rescue them. Lotso tries to sneak away from the dump, but is picked up by a trash man who had one like him when he was a kid. He ties the strawberry bear onto the front of his truck. The toys tell Woody they need to get him back home so he can go with Andy to college. Woody says that the attic may not be such a good idea for the others, about which they say: “We’re Andy’s toys.” They hop aboard the trash truck that picks up in Andy’s neighborhood. When they get home they use the garden hose to clean themselves off, and climb up to Andy’s room. Betty retrieves her lost eye. Woody shakes hands with Buzz and says: “This isn’t good-bye.” The other toys wish him well and tell him to take good care of Andy. Andy climbs into the box headed with Andy to college. Andy and his mother enter the room. Andy’s mother is sad that he is leaving the nest and says she wishes she could always be with him. Andy says: “You will be, Mom.” And from his vantage point Woody becomes misty-eyed. Woody jumps out of his box, writes a note on a post-it, and sticks it to the toy box. Andy looks at the note, and asks his mother: “Do you really think I should donate these?” She says: “Whatever you want.” Andy drives the toys to Bonnie’s house. He tells her they are his toys, but he is going away so he needs someone special to take care of them. He opens the box and introduces the toys to her and makes her promise to take good care of them because they mean a lot to him. Bonnie looks into the box and finds Woody. Andy asks what he’s doing in there? Andy takes Woody back when Bonnie reaches for him. But he ultimately relents and tells Bonnie that Woody is special and will always be there for her. Andy plays with the toys and Bonnie before he drives off to college, as Bonnie and the toys wave good-bye. The toys say, “So long, partner,” as they settle into their new home.