Jaguar Land Rover (JLR) is investing hundreds of millions of pounds to build a range of electric vehicles at its Castle Bromwich plant in Birmingham.
Initially the plant will produce an electric version of the Jaguar XJ.
JLR says the move will help secure the jobs of 2,700 workers at the plant.
The news follows January's announcement, when the firm said it would cut 4,500 jobs, with the majority coming from the UK. That followed 1,500 jobs lost in 2018.
"The future of mobility is electric and, as a visionary British company, we are committed to making our next generation of zero-emission vehicles in the UK," said Prof Ralf Speth, JLR's chief executive.
JLR has not announced when it will launch the battery version of the XJ, but it will replace the petrol and diesel versions which have been made since 1968.
The decision appears to contradict previous warnings by JLR that investment in the UK would be threatened by Brexit, and in particular a no-deal scenario.
However, industry experts say that JLR could not wait to see the outcome of the Brexit, as it needed to update its range of vehicles.
"Given where it is in its product lifecycle it [JLR] has to make this decision. The capacity is at Castle Bromwich and there's research and development nearby as well, so they've basically run out of time on this decision," David Bailey, a professor of business economics at Birmingham Business School, told the BBC's Today programme.
He added that without the new investment the Castle Bromwich plant would "effectively be dead".
The plant also produces the Jaguar XF, XE and F-Type.
JLR is investing to produce an electric version of the XJ model
In January, JLR announced that its new battery making facilities would be located in the Midlands. It said the plant would be the most "technologically advanced" in the UK.
Investment in the UK car industry fell 47% last year from 2017 and the country is attracting a tiny fraction of the global investment in electric cars.
VW alone is investing £70bn in Europe, the US and China.
A no-deal Brexit would see new tariffs imposed on components and parts moving between the EU and the UK.
Vauxhall's parent company said that without a deal it would not make the next generation Astra at Ellesmere Port.
'Confusing policies'
JLR's announcement comes a day after a report showed that in June sales of low emission cars in had fallen for the first time in more than two years.
The Society of Motor Manufacturers and Traders said the fall in alternatively fuelled cars, such as hybrid electric vehicles, was "a grave concern".
It said efforts to sell such cars were being undermined by confusing policies and "premature" removal of subsidies.
In response, the government said its focus on zero emission models had been a success, with registrations of battery electric vehicles up over 60% this year compared with the same period in 2018.