Is Star Wars based on a book?

No, the Star Wars universe originated from the film series created by George Lucas beginning with 'Star Wars: A New Hope' in 1977. A number of books have been written based on the films or in the storyline created from them, but the original material was a film.