As the movie begins, Woody is excited to be going to Cowboy Camp, a yearly event when just he and Andy are together. But before they leave, Andy accidentally rips Woody's arm. Andy can't fix Woody, so rather than take him to camp, he leaves Woody behind.
The next day, Andy's mom holds a yard sale, and almost all the toys panic that they will be sold. However, the one in real danger is a little squeaky toy penguin named Wheezy, whose squeaker is broken. Woody manages to call Andy's dog Buster to help him, and they get Wheezy back in the house. However, Woody is left outside and is soon found by Al McWhiggen, the owner of Al's Toy Barn.
Andy's mom quickly plucks Woody from the collector's grasp, saying that Woody is not for sale. When Andy's mom turns her back, though, Al manages to steal Woody, and quickly rushes off. The toys have seen this from Andy's room, and Buzz rushes outside to rescue his friend. However, the vehicle pulls away, but not before leaving behind a feather. Buzz also notes the license plate, which reads LZTYBRN.
Back in Andy's room, the toys review the events as they unfolded, while Buzz uses Mr Spell to help him decipher the license plate. Finally, he hits on the key: Al's Toy Barn.
Meanwhile, Woody finds himself in an apartment, and once Al leaves, meets up with three other toys: a horse named Bullseye, a cowgirl doll named Jessie, and an in-the-box doll called the Prospector. Each of the toys is excited to see Woody, but he has no idea who they are. They show him around Al's apartment, where Woody soon learns that he was once the star of a popular children's show called Woody's Round-Up.
Back at Andy's place, the toys scan the television in Andy's room for a commercial advertising Al's Toy Barn. Etch-a-Sketch takes down the location, and Buzz jots it down on a post-it note. A rescue party is assembled, comprised of Buzz, Potato Head, Hamm, Rex, and Slinky Dog. Buzz tells the others that they'll return before Andy comes back from Cowboy Camp.
Meanwhile, Woody has been watching episodes of the old television show in Al's apartment, but is shocked when one episode ends on a cliffhanger. The Prospector tells Woody that once public attention turned to astronauts, cowboys were out, and space toys were in. Woody's mood soon sours when he learns that the entire collection of Woody's Round-Up merchandise, as well as the four of them, are all set to be sold to the Kinishi Toy Museum in Tokyo, Japan. Woody says that he can't go, and has to get back to Andy. The Prospector explains that the museum will only accept everything if he (Woody) is included. Otherwise, the entire collection (including Bullseye, Jessie, and the Prospector) will go back into storage -- a situation that gets Jessie very upset.
Suddenly Al returns, intending to get a group photo to send to the Toy Museum. In the process, he pulls off Woody's right arm. Al takes the arm and calls a toy repairman, while Woody freaks out over the loss of his arm.
Later that evening, Al returns to the main room and falls asleep watching TV. Woody notices that his arm is in Al's pocket, and attempts to get it back. However, the VCR suddenly turns on, startling Al, and foiling Woody's plans. Al leaves the room and Woody notices the VCR remote near Jessie, prompting him to accuse her. Jessie does not take this lightly, and gets into a fight with Woody, before the Prospector breaks up their scuffle.
The next morning, Buzz and the other rescuers finally reach Al's Toy Barn and split up to find Woody. Buzz's journey takes him down the Buzz Lightyear aisle, where he sees multiple versions of himself. Noting a display toy with a new anti-gravity belt, Buzz attempts take the belt for himself, but the display Buzz grabs him and subdues him. Much like Buzz in the first film, this other Buzz assumes he is a real space ranger. The deluded Buzz seals the real Buzz in a Buzz Lightyear box. When the others come along, they assume that deluded Buzz is their friend. Deluded Buzz goes off with the others as the real Buzz struggles to get out of his packaging prison.
Back at Al's, the toy cleaner comes and fixes Woody, repairing his arm, then cleaning him and touching up his paint. The cleaner paints over the "ANDY" scrawling on the bottom of Woody's boot, making Woody look just like new. Al then takes the photos he needs, and goes off to his toy store to fax the information over to Japan.
Woody is ecstatic to be whole again, and intends to leave -- much to Jessie's ire. The Prospector tells Woody that maybe he should patch things up between the two of them before he goes. Woody tries to tell Jessie about how great Andy is, but Jessie tells him that she once had an owner as well, named Emily.
Jessie flashes back to her experiences of being loved, forgotten, and ultimately abandoned by her owner, Emily. "When She Loved Me" (by Randy Newman, voice: Sarah McLachlan) serves as the audio, in a memorable cinema-tearjerker montage, depicting how as Emily grew up, Jessie was put aside, and finally tossed into a donations box, never to see her owner again.
Woody quietly starts to leave, when the Prospector warns that the same thing could happen to him, because he can't stop Andy from growing up. If he goes back, he may be discarded like Jessie ... but if he stays with the group, they'll be safe and last forever. Woody decides to listen to the Prospector, much to the delight of the other toys.
Back at Al's Toy Barn, the gang finds Al sending a fax to Japan before going home to pack for his trip to Tokyo. The group jumps into Al's satchel, sure that he'll lead them to Woody. Back in the Buzz Lightyear aisle, the real Buzz has freed himself, and seeing Rex's tail sticking out the back of Al's satchel, follows along a few steps behind. As Buzz exits the store, he knocks over a display, which also contains a boxed toy of Buzz's arch-enemy: Zurg. The toy sees Buzz running off and pursues him.
Unfortunately for the toys, Al leaves his bag in the car, so they attempt to enter Al's building using the ventilation system and an opening into the apartment building's elevator. Eventually, they make it to Al's apartment and find Woody, quickly attempting to rescue him, but not before the real Buzz shows up and proves himself to his friends.
Woody then shocks his friends, claiming that he actually wants to go to Japan. In a near-reverse from the first film, Woody eagerly talks about the television show that was centered on his character, and all the related merchandise. "Woody, you're not a collectible, you are a child's plaything. You. are. a. TOY!" exclaims Buzz, intending to make his friend stay with Andy. But Woody pleads that he is living on borrowed time; any more damage and he could be thrown away. Buzz reminds Woody that he once told him life was only worth living if you're loved by a kid, and that's why he came to rescue Woody...because he believed those words. When Woody still refuses to go, the others decide to leave him.
"I don't have a choice, Buzz," says Woody. "This is my only chance."
"To do what, Woody?" asks Buzz, "To be looked at from behind glass and never be loved again? Some life."
After they leave, Woody contemplates what Buzz said, and as an episode of Woody's Round-Up plays on the TV, Woody looks at his boot, and scrapes off the paint covering the name "ANDY." Woody suddenly has second thoughts, goes to the ventilation grate, and yells to Buzz that he's changed his mind, but then asks Jessie and Bullseye to come with him. Jessie is afraid of being hurt again, but Woody really wants her to come. Woody is about to ask the Prospector, when he finds the Prospector out of his box, sealing off the ventilation shaft cover.
The Prospector's anger then comes out: he's spent his entire life in a package...never bought, never loved. He fully intends to go to Japan along with Woody, Jessie and Bullseye.
Woody's friends attempt to open the grate, but haven't succeeded by the time Al returns to take the gang to Tokyo. The rescuers head back down the ventilation shaft towards the elevator, only to encounter the Zurg toy that was freed when the toys left Al's Toy Barn.
The duplicate Buzz faces off against Zurg, but soon is shocked when the evil ruler proclaims that he is Buzz's father, and attempts to destroy him. Rex saves the day when he accidentally knocks Zurg off the elevator, defeating him.
As the group makes their way to the lobby, they are unable to get in Al's car before it drives away, but they 'borrow' a Pizza Planet delivery truck that is running nearby. The duplicate Buzz stays behind. He's found Zurg, they're partaking in a father/son game of catch.
The group makes it to the Tri-County Airport and manages to get to the baggage area. Because there are numerous cases like Al's, the group splits up. Buzz is eventually able to find the right one, but not before the Prospector pops out and punches him away. Woody faces off to fight the Prospector, but not before the angry toy uses his pick-axe to rip the new stitching on Woody's arm. The Prospector promises further dismemberment unless Woody complies and returns to the suitcase, but the plan is foiled when the rest of the group arrive.
As Buzz holds the Prospector aloft, he rants that children destroy toys, and that someday they'll be tossed out and forgotten, rotting away in a landfill. Woody soon decides that the Prospector could benefit from a little 'playtime,' and the gang shoves him into a little girl's backpack. Upon receiving her backpack, the girl declares that the Prospector needs a makeover.
Back in the airport baggage room, the gang has successfully freed Bullseye, but is unable to get to Jessie before the suitcase is sent out to the airplane. Riding on Bullseye, Woody and Buzz give chase, with Woody eventually making his way to the airplane. Jessie is pleased that Woody came to rescue her, but the joy soon turns to panic when the baggage doors close, and the plane begins to move.
Woody and Jessie make their way out through an opening near the plane's front tires. Then Woody slips, and almost rips his right arm off again, before Buzz appears below. Woody and Jessie manage to swing off the wheel-well using Woody's pull-string and hop aboard Bullseye just as the plane takes off.
The next day, Andy returns from Cowboy Camp and eagerly looks for his toys. They're neatly displayed on the bed -- and there are some new ones. Andy patches up Woody's arm in his own special way, and writes his name on the bottom of Jessie's and Bullseye's feet.
Woody is soon overjoyed to see that Wheezy has also been fixed. One of the toys found an extra squeaker at the bottom of the toy box, and gleefully, Wheezy breaks into song.
As the toys are enjoying the performance, Woody and Buzz go over to the nearby window, where down below, Andy, Molly, and their Mother are playing in the driveway.
"Are you worried?" asks Buzz, remembering Woody's fears of Andy growing up and throwing him away.
"About Andy?" asks Woody. "Nah. It'll be fun while it lasts."
"I'm proud of you, cowboy," says Buzz, happy that his friend has come to terms with their uncertain future.
"Besides," says Woody, putting an arm around his friend, "when it's all over, I'll have my old pal Buzz Lightyear to keep me company... To infinity, and beyond."
The two join the other toys as Wheezy finishes his song ("You've Got A friend In Me," voice: Robert Goulet).