In 1971, Universal Studios agreed to make American Graffiti and Star Wars in a two-picture contract, although Star Wars was later rejected in its early concept stages. American Graffiti was completed in 1973 and, a few months later, Lucas wrote a short summary called "The Journal of the Whills", which told the tale of the training of apprentice CJ Thorpe as a "Jedi-Bendu" space commando by the legendary Mace Windy. Frustrated that his story was too difficult to understand, Lucas then began writing a 13-page treatment called The Star Wars on April 17, 1973, which had thematic parallels with Akira Kurosawa's The Hidden Fortress. By 1974, he had expanded the treatment into a rough draft screenplay, adding elements such as the Sith, the Death Star, and a protagonist named Annikin Starkiller.
For the second draft, Lucas made heavy simplifications, and introduced the young hero on a farm as Luke Starkiller. Annikin became Luke's father, a wise Jedi knight. "The Force" was also introduced as a mystical energy field. The next draft removed the father character and replaced him with a substitute named Ben Kenobi, and in 1976 a fourth draft had been prepared for principal photography. The film was titled Adventures of Luke Starkiller, as taken from the Journal of the Whills, Saga I: The Star Wars. During production, Lucas changed Luke's name to Skywalker and altered the title to simply The Star Wars and finally Star Wars.
At that point, Lucas was not expecting the film to become part of a series. The fourth draft of the script underwent subtle changes that made it more satisfying as a self-contained film, ending with the destruction of the Empire itself by way of destroying the Death Star. However, Lucas had previously conceived of the film as the first in a series of adventures. Later, he realized the film would not in fact be the first in the sequence, but a film in the second trilogy in the saga. This is stated explicitly in George Lucas' preface to the 1994 reissue of Splinter of the Mind's Eye:
It wasn't long after I began writing Star Wars that I realized the story was more than a single film could hold. As the saga of the Skywalkers and Jedi Knights unfolded, I began to see it as a tale that could take at least nine films to tell—three trilogies—and I realized, in making my way through the back story and after story, that I was really setting out to write the middle story.
The second draft contained a teaser for a never-made sequel about "The Princess of Ondos," and by the time of the third draft some months later Lucas had negotiated a contract that gave him rights to make two sequels. Not long after, Lucas met with author Alan Dean Foster, and hired him to write these two sequels as novels. The intention was that if Star Warswere successful, Lucas could adapt the novels into screenplays. He had also by that point developed an elaborate backstory to aid his writing process.
When Star Wars proved successful, Lucas decided to use the film as the basis for an elaborate serial, although at one point he considered walking away from the series altogether.However, Lucas wanted to create an independent filmmaking center—what would become Skywalker Ranch—and saw an opportunity to use the series as a financing agent. Alan Dean Foster had already begun writing the first sequel novel, but Lucas decided to abandon his plan to adapt Foster's work; the book was released as Splinter of the Mind's Eye the following year. At first Lucas envisioned a series of films with no set number of entries, like the James Bond series. In an interview with Rolling Stone in August 1977, he said that he wanted his friends to each take a turn at directing the films and giving unique interpretations on the series. He also said that the backstory in which Darth Vader turns to the dark side, kills Luke's father and fights Ben Kenobi on a volcano as the Galactic Republic falls would make an excellent sequel.
Later that year, Lucas hired science fiction author Leigh Brackett to write Star Wars II with him. They held story conferences and, by late November 1977, Lucas had produced a handwritten treatment called The Empire Strikes Back. The treatment is very similar to the final film, except that Darth Vader does not reveal he is Luke's father. In the first draft that Brackett would write from this, Luke's father appears as a ghost to instruct Luke.
Brackett finished her first draft in early 1978; Lucas has said he was disappointed with it, but before he could discuss it with her, she died of cancer. With no writer available, Lucas had to write his next draft himself. It was this draft in which Lucas first made use of the "Episode" numbering for the films; Empire Strikes Back was listed as Episode II. As Michael Kaminski argues in The Secret History of Star Wars, the disappointment with the first draft probably made Lucas consider different directions in which to take the story. He made use of a new plot twist: Darth Vader claims to be Luke's father. According to Lucas, he found this draft enjoyable to write, as opposed to the yearlong struggles writing the first film, and quickly wrote two more drafts, both in April 1978. He also took the script to a darker extreme by having Han Solo imprisoned in carbonite and left in limbo.
This new story point of Darth Vader being Luke's father had drastic effects on the series. Michael Kaminski argues in his book that it is unlikely that the plot point had ever seriously been considered or even conceived of before 1978, and that the first film was clearly operating under an alternate storyline where Vader was separate from Luke's father; there is not a single reference to this plot point before 1978. After writing the second and third drafts of Empire Strikes Back in which the point was introduced, Lucas reviewed the new backstory he had created: Anakin Skywalker was Ben Kenobi's brilliant student and had a child named Luke, but was swayed to the dark side by Emperor Palpatine (who became a Sith and not simply a politician). Anakin battled Ben Kenobi on the site of a volcano and was wounded, but then resurrected as Darth Vader. Meanwhile Kenobi hid Luke on Tatooine while the Republic became the Empire and Vader systematically hunted down and killed the Jedi.
With this new backstory in place, Lucas decided that the series would be a trilogy, changing Empire Strikes Back from Episode II to Episode V in the next draft. Lawrence Kasdan, who had just completed writingRaiders of the Lost Ark, was then hired to write the next drafts, and was given additional input from director Irvin Kershner. Kasdan, Kershner, and producer Gary Kurtz saw the film as a more serious and adult film, which was helped by the new, darker storyline, and developed the series from the light adventure roots of the first film.
By the time he began writing Episode VI in 1981 (then titled Revenge of the Jedi), much had changed. Making Empire Strikes Back was stressful and costly, and Lucas' personal life was disintegrating. Burned out and not wanting to make any more Star Wars films, he vowed that he was done with the series in a May 1983 interview with Time magazine. Lucas' 1981 rough drafts had Darth Vader competing with the Emperor for possession of Luke—and in the second script, the "revised rough draft", Vader became a sympathetic character. Lawrence Kasdan was hired to take over once again and, in these final drafts, Vader was explicitly redeemed and finally unmasked. This change in character would provide a springboard to the "Tragedy of Darth Vader" storyline that underlies the prequels.