Andy's toys are welcomed by the other toys at Sunnyside, and are given a tour of the seemingly perfect play-setting by Lots-O'-Huggin' Bear (simply known as Lotso), Big Baby, and Ken, with whom Barbie falls in love. All of the toys choose to stay, except Woody, who attempts to return to Andy. Woody is found by Bonnie, one of the Sunnyside children. She takes him home and plays with him along with her other toys, which are well-treated. At Sunnyside, a group of toddlers roughly play with Andy's toys.
Buzz asks Lotso to have them moved to the older children's room, but is captured. Lotso, who controls Sunnyside with an iron fist, reveals he sends new toys to distract the toddlers to keep him and his henchmen safe, not caring whether the toys get broken in the process. Seeing promise in Buzz, he resets him to his original space ranger persona, wiping his memory. At the same time, Mrs. Potato Head (who accidentally left one of her eyes at Andy's house) sees Andy searching for the toys and convinces the toys that Woody told the truth. Before they can leave, Andy's toys are imprisoned by Lotso's gang.
At Bonnie's house, before Woody leaves to find Andy, he learns from a toy clown named Chuckles that he, Lotso and Big Baby once had a beloved owner named Daisy. When the toys were accidentally left behind by Daisy's family during a trip, they made their way back to her house, only to find that Lotso had been replaced with an identical toy, causing Lotso to become embittered.
Woody returns to Sunnyside and reconciles with his friends. That night, the toys attempt to escape, and accidentally reset Buzz to Spanish mode instead of his original persona. However, Buzz allies himself with Woody and falls in love with Jessie. The toys reach a dumpster, but are caught by Lotso and his gang. As a garbage truck approaches, Woody reveals what he learned about Lotso. Lotso says that he now believes toys are meant to be thrown away, leading an enraged Big Baby to throw Lotso into the dumpster. Lotso pulls Woody into the dumpster just as the truck collects the trash. Woody's friends fall into the back of the truck while trying to rescue him, and a falling television hits Buzz, restoring his memory and normal persona.
The truck deposits the toys at a dump, where they find themselves on a conveyor belt leading to an incinerator. Woody and Buzz help Lotso reach an emergency stop button, only for Lotso to abandon them. Believing the end is near, the toys accept their fate, but are rescued by the Aliens operating an industrial claw. Lotso escapes, but a garbage truck driver finds him and straps him to his truck's radiator grill. Woody and his friends board another garbage truck, driven by an adult Sid Phillips, back to Andy's house.
In Andy's room, Woody climbs into the box with Andy's college supplies, while the other toys ready themselves for the attic. Woody leaves a note for Andy and Andy, thinking the note is from his mother, takes them to Bonnie's house and introduces her to his old toys. Bonnie recognizes Woody who, to Andy's surprise, is at the bottom of the box. Though reluctant, Andy passes him on to Bonnie, and then plays with her before leaving. Woody and his friends watch Andy's departure before beginning their new lives with Bonnie.
During the credits, Woody and the other toys learn that Barbie, Ken and Big Baby have improved the lives of the toys at Sunnyside.