Obi-Wan Kenobi was the Padawan of Qui-Gon Jinn. He became the first Jedi to supposedly kill a Sith in approximately 1,000 years. (During the Clone Wars, Darth Maul was revealed to be alive). When Obi-Wan became a Jedi Knight, he took Anakin Skywalker as his Padawan at the dying request of Qui-Gon Jinn. Obi-Wan later became a famed Jedi Master during the Clone Wars, along with Skywalker. Kenobi earned the nickname the Negotiator and fought on many worlds against the Separatists. Under his command was Clone Commander Cody, who would help him fight on numerous worlds. He killed General Grievous on Utapau at the end of the Clone Wars, and barely escaped Order 66. After a duel with the Sith Lord Vader, formerly Anakin, he escaped to Tatooine, where he gave Luke Skywalker, who would later become his last apprentice, to Owen Lars. Later, he lived in the Jundland Wastes in exile as Ben Kenobi. Later, he would go to the first Death Star with Luke, Han Solo, Chewbacca, C-3PO, and R2-D2 to rescue Princess Leia Organa from Darth Vader. Kenobi was struck down by Vader to allow Luke and friends to escape the Death Star. Kenobi's Force ghost would then guide Luke on his quest to become a Jedi Knight.
He knew Luke was the only hope for the Jedi Order.
He was defeated by Anakin (Darth Vader) and transformed into a ghost.
As A Force Ghost
During the Battle of Yavin, he tells Luke to use the Force instead of his targeting computer when Luke was preparing to shoot his torpedoes into the Death Star.
On Hoth while Luke is dying and suffering from frostbite, Obi-Wan tells Luke to go to Dagobah where he will find Yoda.
When Anakin dies Obi Wan tells Anakin that he ended the horror and offers him to learn how to become a ghost.