Woody returns to Sunnyside to free his friends, and together they hatch a plan to break out that night.
First Potato Head gets himself thrown in the box again - where he takes himself apart piece by piece ... and with the help of a tortilla wrap becomes a new man.
Slinky and Woody get into the ducts and take out the clapping monkey who studies the CCTV cameras.
The Piggy Bank and Rex fight to be disrupted by Buzz, who is then trapped under a plastic box. Barbie, who has been distracting Ken (was that really Michael Keaton's voice??), then ties him up and gets the instruction manual from the librarian. The gang all regroup and manage to reset Buzz but accidentally turn on his Spanish default setting. With the Ken/Barbie scenes and then the Buzz bit the movie really starts to pick up and becomes laugh-out loud funny again.
Ok, so they make it to the wall, avoiding Big Baby, but when they reach the metal bin they are trapped by Lotso. They reach out to Big Baby, telling her that Lotso has been lying all this time, and then in a Return of the Jedi moment Big Baby picks up Lotso and throws the evil emperor into the trash can. They all run away but a little alien is trapped. When Woody goes back to help him, Lotso grabs onto Woody's leg and when the others return it's too late and they are all picked up and hurled into the back of the dumpster.
Buzz saves Jessie from a falling tv, but survives and is reset to normal Buzz.
The toys are pushed out to a landfill site. The aliens grab a nearby claw but the rest are taken onto a conveyor belt. To avoid being crushed, they hitch a ride on the magnetized metal rubbish - but the next conveyor belt leads to a fiery furnace. Lotso spies the safety cut-off switch and the toys help him to reach it - but he betrays them and leaves.
In the fiery pits of Hell without any way of escape, they join hands and close their eyes in a touching moment - until a giant claw picks them up and takes them away to safety - controlled by the little 3 aliens.
Lotso is picked up by another driver who sticks him to the front grill of his dump truck.
The toys hitch a ride back to Andy's and get washed down, before Woody climbs back into the box for things to go to uni while the rest are in the box for the attic. Woody thinks, then quickly writes something on the attic box and climbs in.
Andy gets in his car and drives over to the little kid Bonnie's place - and he opens the box to give her his toys, explaining what he likes about each one. It's a really sad scene - which is crazy, as it's only toys!! But it works.
Finally, Andy sees Woody in the box and tries to hide him - but Bonnie remembers him from before. Reluctantly Andy hands the toy over, and they have one last playtime together.
Andy says his sad goodbyes and drives away. Woody then introduces his gang to Bonnie's toys, and soon they receive a letter from Ken telling them of the new, fair, system at Sunnyside and everyone is happy once more as the Trilogy comes to an end.