"Several critical elements of Tesla's automated manufacturing systems will be designed and produced" in Pruem in western Germany, the California-based firm said in a statement.
Tesla, founded by tech billionaire Elon Musk, aims to produce 500,000 cars per year by 2018 after taking some 370,000 pre-orders for its mass-market Model 3, which will sell for around USD 35,000 (just under 32,000 euros).
This year, the firm hopes to build between 80,000 and 90,000 units of its luxury Model S and Model X vehicles, 50,000 of them in the second half.
Neither Tesla nor Grohmann offered details of how much money is to change hands in the transaction.
More From This Section
According to founder and chief executive Klaus Grohmann, the German company employs around 700 people.
The firm had revenues of 123 million euros in 2015.
Tesla said it expected to close the deal, which still needs to be approved by regulators, by early 2017.
It added that it hopes to create "over 1,000 advanced engineering and skilled technician jobs in Germany over the next two years".
Asked about the firm's expansion plans, Musk said Tesla was considering setting up several factories in Europe.
Tesla currently manufactures its vehicles at a plant in California, and it has built a so-called "gigafactory" in Nevada to make the special batteries needed for its cars.
"There's no question that long-term Tesla will have at least one and maybe two or three vehicle and gigafactory locations in Europe," Musk said.