Star Wars' creator George Lucas will build his Museum of Narrative Art in Los Angeles.
The project's organisers announced that after "extensive due diligence and deliberation" the city had been chosen over San Francisco.
The museum will cost over $1bn (£0.8bn) and be financed by Lucas himself.
It will exhibit art and memorabilia from the Star Wars franchise and other cinema classics, including The Wizard of Oz and Casablanca.
The museum will be located in Exposition Park, near other attractions including the Natural History Museum of Los Angeles County, the California African American Museum and the California Science Center.
Los Angeles Mayor Eric Garcetti said his city was "the ideal place for making sure that it touches the widest possible audience".
"We went after it with everything we have," he added.
Originally, Lucas had planned to build the museum in Chicago, but he faced local community opposition and abandoned the proposal last year.
San Francisco had offered a site on Treasure Island, in the middle of San Francisco Bay, but failed to win over the project's organisers.
The new museum will sit near the University of Southern California, where George Lucas studied film in the 1970s.
As well as Star Wars items like Darth Vader's mask, the museum will show artworks chosen from the 40,000 items in Lucas' collection, including works by such artists as Norman Rockwell, Edgar Degas, Winslow Homer and Pierre-Auguste Renoir.
Lucas made the first Star Wars film in 1977 and sold the franchise to Walt Disney in 2012 for $4bn.