Escape from Cloud City The Escape from Cloud City took place during the Galactic Civil War . As part of a plot to capture Luke Skywalker , Darth Vader led the Imperial Military to Cloud City , a tibanna gas mine in the atmosphere of Bespin . The Dark Lord of the Sith laid a trap for Skywalker and dueled the fledgling Jedi in an attempt to capture him . At the same time , members of the Rebel Alliance fought to rescue Han Solo from the bounty hunter Boba Fett who was working for the Hutt Clan and escape from Cloud City . They were unable to rescue Solo , who had been frozen in carbonite as part of Vader ' s plot , but they were able to fight their way past stormtrooper s escape from the city aboard the " Millennium Falcon " . The Rebels , along with the city ' s Baron Administrator , Lando Calrissian , briefly returned in order to rescue Skywalker , who was injured in his duel with the Dark Lord , before evading the Imperial Navy and making the jump into hyperspace to rejoin the Alliance Fleet . Prelude . Capture . Hoping to turn Luke Skywalker to the Dark Side , Darth Vader sent part of the Imperial Navy to Cloud City , after it was discovered by the bounty hunter Boba Fett to be their destination , in order to capture Luke ' s friends , Han Solo , Leia Organa and Chewbacca and use them as bait to lure Skywalker out of hiding and turn him . Having landed just before the " Millennium Falcon " , Vader made a deal with the city ' s Baron Administrator , Lando Calrissian , to capture Skywalker ' s friends in exchange for his city ' s autonomy from the Empire . . When the Millennium Falcon eventually arrived at Cloud City , its crew was warmly welcomed by Calrissian , who gave them rooms to stay in and arranged for their ship to be repaired . Unbeknownst to him , however , the " Falcon ' s " hyperdrive was secretly deactivated by a team of Imperial technicians in the event of their escape . On the way to their apartment , C - 3PO was separated from the group after being distracted by another protocol droid , finding and being shot by a stormtrooper , dismembering him . C - 3PO ' s parts were later sent to the garbage incinerator of Cloud City , but they were found by Chewbacca before they were destroyed . On their last day , Calrissian invited them to dinner , but it turned out to be a trap set by Darth Vader . Solo , upon seeing Vader , tried to shoot the Sith Lord , only for Vader to block the shots with one gauntleted hand , and pull the smuggler ' s blaster away from him with the other . Stormtroopers surrounded the rebels , ensuring that they could not escape . While Vader decided to torture Solo in order to draw Skywalker ' s attention , Calrissian began to feel uneasy as Vader altered the agreement . When he protested the idea of keeping Organa and Chewbacca in the city as prisoners , and giving Solo to Fett , Vader reminded him that disobedience would result in the end of his colony ' s freedom . Now seen as a traitor to his friends , Calrissian was forced to comply with Vader . Vader ' s trap would , as planned , eventually reach Luke as a vision and he rushed off to save his friends , despite objection from both Yoda and Ben Kenobi . Freezing Solo . Vader had planned to put Skywalker in carbonite , in order to be delivered to The Emperor personally . Hoping to avoid his son ' s death , Vader chose Solo as a test subject for the modified freezing chamber . Solo , Organa , Chewbacca , and C - 3PO ( partially reassembled by Chewbacca in prison ) were brought to the carbon - freezing facility , where Solo learned of his fate . Despite Chewbacca ' s attempt to set him free , Solo insisted that there would be another time to rescue him . Before he was frozen , Organa told Solo how she felt about him , to which he responded " I know . " Solo was then frozen , and found to have survived . Afterwards , Vader was informed that Skywalker ' s X - wing had just landed . Vader then ordered Calrissian to bring Organa and Chewbacca to his ship . When he protested , Vader simply stated that he was altering the deal . The escape . Realizing that the " deal " had gone too far , Calrissian arranged for the Bespin Wing Guard to ambush the Imperial team escorting himself , Organa , Chewbacca , and C - 3PO ( still strapped to the Wookiee ' s back ) to Vader ' s ship . Chewbacca and Organa , however , did not trust him due to his prior betrayal , with Chewbacca nearly strangling him until he revealed that there was still a chance to save Solo from Fett . Deciding it was worth the risk , the foursome rushed to intercept Fett , reaching his landing platform just in time to see the " Slave I " take off . Realizing that - for now , at least - Solo was gone , they redirected their efforts into escaping . After reaching the " Falcon ' s " hangar door , they discovered that the access codes had been changed , preventing Calrissian from unlocking the doors . C - 3PO then realized that R2 - D2 could override the security systems , but accidentally directed the astromech into plugging into a power socket . Before leading group to another door with a computer terminal , Calrissian informed the citizens of Cloud City of the Imperial occupation , and advised them to leave as soon as possible . The ensuing chaos worked to their advantage , helping them get to another door mostly unhindered by Imperial forces , though they encountered several stormtroopers upon reaching another door . After R2 - D2 plugged in , he learned from the city ' s central computer that the " Falcon ' s " hyperdrive had been deactivated after its repairs . However , when he tried to inform the group about this , C - 3PO interrupted him , saying that the hyperdrive had been fixed , and telling him to open the door . After Artoo did so , and covered their retreat with a smokescreen , the group boarded the " Falcon " and took off , barely escaping the Imperial troops . Skywalker , having just been defeated by Vader in a lightsaber duel , was clinging for his life at a vane on the bottom of Cloud City . First calling to Ben Kenobi for help and receiving no response , he called to someone else : Leia . Organa , onboard the " Millennium Falcon " on her way out of the city , heard Skywalker ' s plea and ordered the ship around . Finding Skywalker dangling from the vane , they pulled up beneath it , and Calrissian pulled the young Jedi to safety . As the " Falcon ' s " hatch closed , three TIE fighters showed up and pursued the rebels into space while firing at the freighter . Having left the planet ' s gravity well , the " Falcon " , upon sighting the " Executor " , attempted to jump to hyperspace , only to find the " repaired " hyperdrive nonfunctional . As the crew desperately attempted to fix the hyperdrive while R2 - D2 was reassembling C - 3PO , the astromech realized what the problem was , having been told earlier by Cloud City ' s central computer , and managed to reactivate the drive , allowing the rebels to escape into hyperspace . Aftermath . After the " Falcon " jumped to hyperspace , the team of Imperial technicians that had deactivated its hyperdrive expected to be executed . To their surprise , Vader did nothing , simply striding out of the bridge of his flagship . The " Falcon ' s " crew , meanwhile , rendezvoused with the Alliance Fleet , where Skywalker received a prosthetic arm to replace the one he had lost , with it being completed as Calrissian and Chewbacca set off on a mission to rescue Solo from Jabba the Hutt . Cloud City was taken into Imperial control , with several trades , such as cybernetic implants , being suppressed , and a skeleton garrison stationed there . In the aftermath of the Battle of Endor , however , the garrison was relocated to a more strategic location , setting the stage for the city ' s eventual liberation . Behind the scenes . The Escape from Cloud City first appeared in . The novel " Lost Stars " also featured the escape from the viewpoint of Ciena Ree , who was one of the Imperial technicians tasked with deactivating the " Falcon ' s " hyperdrive .