Local production would eliminate risks from tariffs and other import controls. It would help Tesla develop parts suppliers to support after service and make its vehicles more appealing to mainstream Chinese buyers.
Tesla said it signed a "land transfer agreement" on a 210-acre (84-hectare) site in the Lingang district in southeastern Shanghai.
That is "an important milestone for what will be our next advanced, sustainably developed manufacturing site," Tesla's vice president of worldwide sales, Robin Ren, said in a statement.
Shanghai is a center of China's auto industry and home to state-owned Shanghai Automotive Industries Corp., the main local manufacturer for GM and VW.
Tesla said earlier that production in Shanghai would begin two to three years after construction of the factory begins and eventually increase to 500,000 vehicles annually.
Tesla has yet to give a price tag but the Shanghai government said it would be the biggest foreign investment there to date. The company said in its second-quarter investor letter that construction is expected to begin within the next few quarters, with significant investment coming next year. Much of the cost will be funded with "local debt" the letter said.
Tesla's US$5 billion ($7.6b) Nevada battery factory was financed with help from a US$1.6b investment by battery maker Panasonic Corp.
Analysts expect Tesla to report a loss of about US$200 million for the three months ending September 30 following the previous quarter's US$742.7m loss. Its CEO Elon Musk said in a September 30 letter to US securities regulators that the company is "very close to achieving profitability."
Tesla's estimated sales in China of under 15,000 vehicles in 2017 gave it a market share of less than 3 per cent.
The company faces competition from Chinese brands including BYD Auto and BAIC Group that already sell tens of thousands of hybrid and pure-electric sedans and SUVs annually.
Until now, foreign automakers that wanted to manufacture in China were required to work through state-owned partners. Foreign brands balked at bringing electric vehicle technology into China to avoid having to share it with potential future competitors.
The first of the new electric models being developed by global automakers to hit the market, Nissan's Sylphy Zero Emission, began rolling off a production line in southern China in August.
Lower-priced electric models from GM, Volkswagen and other global brands are due to hit the market starting this year, well before Tesla is up and running in Shanghai.
- AP