During the prequels, Obi-Wan Kenobi was a dedicated Jedi warrior and servant of the Galactic Republic. In Star Wars - Episode I: The Phantom Menace, he was a Padawan learner under roguish Jedi Master, Qui-Gon Jinn. While he could be headstrong at times and often questioned his master, both Qui-Gon and the Jedi Council saw that he possessed great strength, wisdom and spirit. Following the Battle of Naboo, Obi-Wan was appointed the rank of Jedi Knight by Master Yoda and was allowed to train the young Anakin Skywalker, as he had promised Qui-Gon shortly before his death. For the next ten years, Obi-Wan tutored Anakin in the ways of the Jedi and in the proper use of the Force. He had hoped that he could be as great a teacher as Qui-Gon or Yoda, but Anakin often proved to be brash and arrogant, repeatedly acting without his master's guidance. Though Anakin was a difficult student, Obi-Wan endeavoured to help the Padawan reach his full potential.
By Episode II: Attack Of The Clones, Obi-Wan had achieved the rank of Jedi Master and sat on the Jedi Council. When the Clone Wars broke out, he became a Republic general and led clone troopers and Jedi alike into battle against the Separatist Droid Army on many different fronts. Even after Anakin was promoted to Knight status, the two remained a formidable team and were involved in many campaigns together. Obi-Wan would come to regard Anakin as a brother, but his bond with his former pupil would be left in tatters as the Clone Wars drew to a close in Episode III: Revenge Of The Sith.
When Anakin turned to the dark side of the Force, he helped Chancellor Palpatine carry out Order 66: the extermination of the Jedi. Obi-Wan, having just slain the Separatist General Grievous on Utapau, managed to survive his clone squad's sudden betrayal and escape with the help of Republic senator Bail Organa. They returned to the Republic capital of Coruscant and Obi-Wan and Yoda infiltrated the Jedi Temple, which had been left in ruins and was under heavy guard. Here, Obi-Wan discovered that Anakin had betrayed the Jedi and that he and Palpatine were about to bring the galaxy under their control. Yoda commanded Obi-Wan to find Anakin - now known as Darth Vader - and kill him, and so Obi-Wan sought out Padme Amidala for clues to his whereabouts. There he found out that Anakin and Padme had been secretly married for the last three years and that Anakin was the father of her unborn child. Both Padme and Obi-Wan travelled to the volcanic world of Mustafar where Anakin had gone to dispose of the Separatist Council, and Obi-Wan and Anakin became locked in a fierce duel. Their battle took them across a river of lava and Obi-Wan gained the advantage after making it to a riverbank. Anakin leapt after him but Obi-Wan severed Anakin's limbs in a swift lightsaber strike. As Anakin screamed his hatred of his former mentor, Obi-Wan left him on the riverbank to burn alive.
Obi-Wan then left Mustafar with the dying Padme, taking her to a medical facility on a distant asteroid. After the birth of Anakin's twin children and Padme's death, Obi-Wan was ordered by Yoda to take the infant Luke Skywalker to Tatooine to be raised by his uncle, Owen Lars. Obi-Wan left Luke at the Lars homestead and went into exile beyond the Jundland Wastes, assuming the name of 'Old Ben Kenobi'. For the next seventeen years, Ben watched over Luke from afar until the time eventually came when he would teach the boy in the ways of the Force so that the galaxy may yet be saved from the wrath of the Galactic Empire.
In Star Wars - Episode IV: A New Hope, Obi-Wan and Luke Skywalker meet face-to-face after the old man saves Luke from Tusken Raiders in the Jundland Wastes. Old Ben is reintroduced to Anakin's old droid co-pilot R2-D2, which has now fallen into his son's service. Artoo carries a message from his former master, Princess Leia Organa from Alderaan, who pleads Obi-Wan to help her and the Rebel Alliance in their struggle against the Empire. With Luke and his droids in tow, Obi-Wan travels to the spaceport at Mos Eisley where the group find the smuggler Han Solo, who offers them passage to Alderaan for a hefty price. The group leave Tatooine in the Millenium Falcon and reach the Alderaan system, only to find that Alderaan has been obliterated by the Empire's new superweapon, the battle-station known as the Death Star. The Falcon is caught in the Death Star's tractor beam and pulled into its docking bay, but Han and the others manage to ambush the stormtroopers that board the ship and Han and Luke steal their uniforms, emerging from the ship with Obi-Wan and Chewbacca as 'prisoners'. Soon, Obi-Wan leaves Luke and the others to find the station's tractor beam terminal and shut it down so that the Millenium Falcon can escape. Obi-Wan succeeds in shutting off the tractor beam, but is shortly after confronted by Darth Vader, his former apprentice.
Vader and Obi-Wan engage each other in a lightsaber duel and seem to be evenly matched, but Obi-Wan is merely biding time for Luke and Han to escape with Princess Leia. As they return to the hangar, Luke spots Obi-Wan and Vader fighting and Obi-Wan, seeing that his friends are about to get away, holds up his lightsaber with an expression of peaceful acceptance on his face. Vader takes this moment to carve through Obi-Wan with his own blade, but as he cuts through, Obi-Wan's body mysteriously vanishes into thin air and his robes fall to the floor.
After Obi-Wan's apparent death, Luke continues to be guided by the old wizard, hearing his voice telling him to trust his instincts and to feel the Force. In The Empire Strikes Back and Return of The Jedi, Obi-Wan appears as a ghostly apparition before Luke and also Yoda, having attained a new level of power and consciousness beyond death through his connection to the Force.