The story of Obi-Wan Kenobi from the Star Wars franchise.
The Phantom Menace
In 32 BBY, twenty-five-year-old Kenobi and his Master Qui-Gon Jinn headed for the planet Naboo on a mission to resolve a trade dispute. They arrived on the Trade Federation flagship Saak'ak where they were betrayed by the Trade Federation Viceroy, Nute Gunray. The two Jedi escaped to Naboo's surface and eventually met the Otolla Gungan outcast, Jar Jar Binks. Binks agreed to take the two to safety in his underwater home city of Otoh Gunga (A.K.A. Gunga City) where they were taken to Boss Rugor Nass. Jinn persuaded Boss Nass to let them go and were given both Binks (Binks swore a life debt to Jinn for saving his life) and transportation to Theed, the capital city of Naboo.
While there, they rescued Queen Amidala from the Trade Defense Force and departed for Coruscant, the Galactic Republic's capital planet, to ask for help from the Senate. An astromech droid named R2-D2 managed to repair the Queen's starship and they narrowly escaped an attack from Federation battleships.
Due to the damage, the ship's hyperdrive sustained in the attack, the Queen's party was forced to land on the desert planet of Tatooine for repairs. Jinn decided to head to the nearest city, Mos Espa, leaving Kenobi to guard the Queen and her servants. A couple days later, Jinn returned with the necessary components for the hyperdrive and a little nine-year-old boy named Anakin Skywalker. Before they could reach the ship, Jinn was openly ambushed by Darth Maul (Darth Sidious' Sith apprentice) and escaped on the ship, presumably leaving Maul stranded on Tatooine. Afterward, Jinn officially introduced both Skywalker and Kenobi.
When the ship finally made its way to Coruscant, Jinn and Kenobi were greeted by Republic Senator Palpatine and were taken to the Jedi Temple, where they informed the Jedi High Council of Anakin's powerful connection to the Force. The Council then requested that Anakin be brought before them in order to judge if he was worthy to join the Jedi Order. After performing various test on Anakin, they refused to recruit him in the Order on account of him being too old to join. Jinn then decided to train him as his unofficial padawan, despite the protests of both the Council and Kenobi. While this was going on, Queen Amidala decided to return to Naboo and confront the Trade Federation.
Amidala, accompanied by Jinn, Kenobi, and Skywalker, pleaded for assistance from the Gungans. Agreeing to help, the Gungans volunteered to battle the droid army on the front lines while the rest infiltrated Theed Palace.
Upon successfully storming the Palace, the queen, her troops, and the Jedi were halted by Darth Maul. Jinn and Kenobi offered to face against Maul while the rest confronted Viceroy Gunray (An offer the Queen quickly accepted).
As the fierce duel ensued, Jinn, Kenobi, and Maul were separated by a force field in the entrance to the Generator Room. When the force fields deactivated, Jinn and the Sith continued their battle while Kenobi remained divided from the battle by one force field when they all reactivated. Maul suddenly hit Qui-Gon Jinn on the chin with his lightsaber handle, stunning him, and then rammed his lightsaber straight into Qui-Gon's chest, mortally wounding him.
Heartbroken, Kenobi redoubled his assault upon Darth Maul and chopped Maul's lightsaber in half, but the Sith almost killed Kenobi when he Force-pushed him to the edge of a melting pit. Kenobi saved himself from falling when he manages to grab onto a pipe protruding from the wall of the pit. Darth Maul then kicked the Jedi's lightsaber into the pit and prepared to finish him off. Struggling to maintain his grip, the Padawan calmed himself, using the Force to jump out of the pit and summoned his fallen Master's lightsaber to his hand. Within an instant he landed behind the surprised Maul and cut him in half, leaving the Sith's body falling into the pit.
Just before passing away, Qui-Gon instructed Obi-Wan to train Anakin to become a Jedi as a promise. Obi-Wan gave his word that he will. The newly-elected Chancellor Palpatine arrived to congratulate Queen Amidala on her victory, as Nute Gunray was sent to stand trial for his crimes.
After the battle, the Jedi Council named Obi-Wan a Jedi Knight. Kenobi conveyed his Master's wish regarding Anakin Skywalker to Jedi Grand Master Yoda, who reluctantly allowed him to become Obi-Wan's apprentice.
During Qui-Gon Jinn’s funeral, Kenobi reassured Anakin that the latter will become a Jedi under Kenobi’s tutelage.
Attack Of The Clones
Ten years after the duel of Darth Maul and Qui-Gon's death, Obi-Wan Kenobi is now a respected Jedi Knight and the master of Anakin Skywalker. The two have formed a close friendship, although Anakin is arrogant and believes his master is "holding him back". After they save Senator Padmé Amidala from an assassination attempt, Obi-Wan goes on a solo mission and traces the bounty hunters involved to the planet Kamino. There, he learns of a massive clone army that the planet's inhabitants are building for the Republic. He is introduced to bounty hunter Jango Fett, the clones' template, and the two fight after Obi-Wan deduces that Fett must be behind the attempted assassination. Fett escapes to the planet Geonosis with his clone son while Obi-Wan is in pursuit.
On Geonosis, Obi-Wan discovers that a conspiracy of star systems bent on secession from the Republic is led by Sith Lord Count Dooku, Qui-Gon's old master. After sending a message to Anakin, Obi-Wan is captured, interrogated and sentenced to death by Dooku. A cadre of Jedi arrive with the Kaminoan clone army just in time to prevent the executions. Obi-Wan and Anakin confront Dooku during the ensuing battle, but are defeated in a lightsaber duel. Yoda intervenes and saves their lives, at the cost of Dooku's escape.
Clone Wars series
Obi-Wan is a general in the Clone Wars, and he and Anakin have many adventures fighting the Separatists. The latter series highlights his numerous confrontations with General Grievous, his adversarial relationship with Dark Jedi Asajj Ventress, his romance with Duchess Satine Kryze, and the return of his old enemy Darth Maul.
Revenge Of The Sith
Three years after dueling Dooku on Geonosis, Obi-Wan was piloting his starfighter with Anakin to rescue the Chancellor from Grievous and was almost killed by Buzz droids until Anakin saved him and help him make a safe landing in the Invisible Hand. When R2 operated the elevator to go down he told R2 that they need to go up not down. When the elevator went up he draws out his blade only to realize its Anakin not an enemy. When Dooku attempts to stop the rescue of Palpatine Obi-Wan was knocked out unconscious by Dooku and was knocked out until after Dooku dies and the trio is in the Elevator tunnel.
When they try to escape the Invisible Hand they were trapped by a Ray-shield and brought to Grievous where they escape capture and was about to make Grievous surrender until the cyborg threw the magnaguard staff at the glass and the Separatist general escapes while the Jedi tries to make the doomed cruiser do a safe landing. After Palpatine was saved Kenobi heads back to the Jedi Temple just to report that Grievous has escaped and during one of the Jedi councils meetings the Jedi order made Anakin spy on Palpatine and Kenobi goes on a hunt for Grievous on Utapau. When Anakin and Kenobi say their goodbyes Kenobi and his clone commander Cody heads to Utapau to search for Grievous. Kenobi ordered his men to don't attack until he confirmed that Grievous is there.
When he arrived on the Separatist controlled planet the people there told Kenobi they are being held hostage with over thousands of battle droids and Obi-Wan ordered his droid to pilot his starfighter back to the fleet. When Kenobi found his arch-enemy Grievou he heard the Separatist council is being moved to Mustafar and after they leave he destroyed 4 Magnaguards by making a huge object fall on them and used his lightsaber to cut one of their heads off and prepares to battle the cyborg. Despite the generals 4 arms he managed to gain the upper hand while his clone troopers attacked the battle droids. Grievous eventually heads on a wheeled vehicle to try to escape with Kenobi chasing him down.
Eventually the two made it to Grievous' starfighter and after exposing the Generals organs beneath his armor he used the force to pull his blaster towards him and shoot the general five times till Grievous explodes in a fiery doom. After the generals demise and receiving his lost lightsaber from Cody the clones turned on him by ordering an AT-TE to shoot him but they missed and Kenobi escapes Utapau by using Grievous' starfighter to get off the planet and contact Bail about his clones turning on him and learned that the other Jedi suffered from the clone troopers' betrayal. He and Yoda head to the Jedi temple and learned about how Anakin massacred everyone including the younglings till there is no Jedi alive in the temple. Kenobi wants Yoda to send him after the Emperor because he says Anakin is like his brother but Yoda told him the boy he trained and raised is gone and consumed by Darth Vader and Kenobi isn't strong enough to fight Sidious.
He then heads to Padme to tell her the bad news and learned that Anakin is the father which caused her to find Anakin on Mustafar only for Kenobi to secretly stowaway with her on her starship. After he reveals himself to Padme and her husband Vader strangles his wife with the force and then fought Obi-Wan in a battle of the men across the lava filled planet. When Obi-Wan warned Vader to not to do it Vader jumped near Kenobi and resulted in Vader got defeated when Kenobi cut off his legs and his left hand and left him to burn by the lava while Kenobi collects his former Padawans lightsaber and leave just to try to save Padme and her twins.
After the birth of Leia and Luke Padme told Kenobi that there is still good in Vader before dying and Kenobi decided that to keep the kids safe from Vader they had to be separated from each other with Bail Organa care for Leia while Kenobi watches over Luke after he delivers him to Owen and Beru Lars.
Obi-Wan Kenobi makes a brief appearance as a hologram in the pilot episode Spark of Rebellion.
After the rise of the Empire, Obi-Wan Kenobi sent out messages to any Jedi who survived order 66 about the fall of the Jedi Order and the Old Republic. He warned all surviving Jedi to not return to the Temple and continue to trust in the Force. Then before bidding the Jedi his farewells he believed that a New Hope would someday emerge.
In "The Holocrons of Fate" and "Visions and Voices", Ezra Bridger and Maul both discover that Obi-Wan is still alive and that he is on "a planet with twin suns". Maul, his grudge against Obi-Wan still present even after seventeen years, sets out to look for his old nemesis and kill him once and for all.
Obi-Wan would not make a visual appearance until "Twin Suns", when Ezra journeyed to Tatooine to find him. He first met Ezra and Chopper when he found them lost in the desert, and explained to him that Ezra had been tricked by Maul into helping him find Obi-Wan Kenobi. Obi-Wan also stated that Maul was not Ezra's problem to face, and that the Dark-sider was Obi-Wan's responsibility. He would eventually meet up with his old foe, shortly after. In a final battle between the two enemies, Maul pondered why Obi-Wan would hide on Tatooine before correctly deducing that he was guarding someone. Obi-Wan readied himself and fought Maul as his old foe attacked, their duel lasting only a few swift blows before the Jedi Master fatally wounded Maul with one slash of his lightsaber. As Maul lay dying in his arms, the former Sith Lord asked if the person he was guarding was the one who would destroy the Sith. Obi-Wan replied yes, and satisfied that he and Obi-Wan would both be avenged for what the Sith had done, Maul finally died, with Obi-Wan closing his enemy's eyes out of respect. After burying Maul, Obi-Wan watched Luke Skywalker, the very person he had protected from the former Sith, from afar, knowing the events he was destined to become part of.
A New Hope
Nineteen years after the Duel on Mustafar and delivering Luke Skywalker to the Lars family, he exiled on Tatooine to watch over Luke. Tusken Raiders were attacking Luke and Obi-Wan made the sound of a Krayt Dragon, a creature that the sand people (AKA Tusken Raiders) are afraid of. When Luke asked if he knew Obi-Wan Kenobi he explained that he did and in fact was him. Obi-Wan then took Luke, R2-D2 and C-3PO to his house for protection. R2 had secret Death Star plans and a message for Obi-Wan by Leia Organa which said to send R2-D2 to Alderaan to Senator Bail Organa. Obi-Wan then gave Luke his father's Lightsaber.
Obi-Wan and the others travelled to Mos Esley Spaceport to find a pilot to take them to Alderaan. Hopefully they found Captain Han Solo, and Chewbacca, Han's first mate. Han and Chewbacca took Obi-Wan, Luke and the droids to their ship The Millennium Falcon. On the Millennium Falcon Obi-Wan gave Luke Basic Jedi Training.
In the meantime, The Millennium Falcon was being tractor-beamed by the Death Star. While Luke and Han rescue Leia disguised as Stormtroopers, Obi-Wan manages to disable the tractor-beam. Obi-Wan then encounters his former apprentice, Darth Vader on the Death Star and they dueled. While Luke and the others are able to flee from the Death Star, Obi-Wan decides to sacrifice himself for Luke and Vader cuts him down as his body disappears leaving only his robe and lightsaber and Luke is forced to flee as the Millennium Falcon leaves the Death Star and Luke mourns the loss of Obi-Wan.
During the battle on the Death Star, Obi-Wan tells Luke to use the force as a spirit to help him not give up before Han returns to tell Luke to destroy the Death Star once and for all. After the destruction of the Death Star, Obi-Wan tells Luke that the force will always be with him before Luke returns to Yavin IV.
Star Wars V: The Empire Strikes Back
He reappears as a force ghost to Luke and tells him to find Yoda to continue his training in the ways of the Jedi. Obi-Wan later tried to advise Luke to stay in Dagobah but Luke refused to listen.
Star Wars VI: Return Of The Jedi
One year after the Battle of Hoth, he reappear to Luke and explained why he lied to Luke about his father. Luke still believed that his father has some good in him. This was proven true when Darth Vader saved Luke Skywalker from Palpatine only to die himself. Obi-Wan watch Luke and the rebels celebrate their victory with Yoda and Anakin Skywalker. He is last seen with Yoda and his apprentice, Anakin bidding farewell to Luke and Leia.
Star Wars VII: The Force Awakens
Thirty years after the destruction of the second Death Star and bidding Luke and Leia farewell as a force ghost along with Yoda and Anakin, Obi-Wan is referenced when Rey hears his voice as a guide, telling her that these are her steps.
Star Wars: The Rise of Skywalker
Obi-Wan's Force Spirit gives encouragement to Rey in the final battle against Palpatine, being the first of the Jedi from the past to speak to her, saying "These are your final steps, Rey. Rise and take them".