From the Star Wars Merchandise Wiki.

Marvel Comics is one of the largest and most financially successful company in comics, and the first to produce Star Wars comics

Marvel produced Star Wars comics from 1977 until 1987

During the 70's Marvel's sales were dwindling, leading to possible bankruptcy George Lucas, creator of Star Wars, was able to secure a deal with Stan Lee, to produce a series of Star Wars comics. After Star Wars became a hit Marvel's financial situation suddenly turned around thanks to Star Wars and the success of The Uncanny X-Men and Daredevil.

The last Star Wars comic series Marvel produced was Ewoks and Droids. Dark Horse comics would later pick-up what Marvel Comics had started