The prime minister is due to make a televised speech at an electric-car plant in the West Midlands – but the visit risks being overshadowed by Mr Musk’s change of heart.
At an award ceremony in Germany, the entrepreneur announced: “We’ve decided to put the Tesla Gigafactory Europe in the Berlin area.”
And speaking to Auto Express, he blamed Brexit uncertainty for his decision to drop plans to build a research and development base in the UK, which will now also go to Germany.
“Brexit made it too risky to put a Gigafactory in the UK,” Mr Musk said, referring to Tesla’s new battery and electric vehicle plant.
Mr Johnson has claimed investors are ready to unleash development plans in the UK if his Brexit deal is passed – but is facing renewed criticism that it will be a hard Brexit that will deter companies.
To add to the embarrassment, his controversial chief aide Dominic Cummings was captured wearing an “Open AI” T-shirt’ – the Silicon Valley start-up Mr Musk founded – on one of his first days in No 10.
He did announce plans to fund research to develop the world’s first nuclear fusion plant, but most experts believe achieving that dream is still 30 years away.
The Tories have also said they will invest £1bn in the UK’s electric-car industry, but little has been said that could help hit the ambitious 2050 legal target.
Today, Mr Johnson will vow to “harness the power of science, innovation and technology to tackle climate change, spur economic growth and create high-skilled, high-wage jobs”.
Tom Brake, the Lib Dem Brexit spokesperson, seized on Mr Cummings’ admiration of Mr Musk, saying: “The very entrepreneur Cummings idolises has chosen not to invest in the UK because of the extreme Brexit he is pursuing.
“You really couldn’t make it up. This completely demolishes the Johnson and Cummings Brexit fantasy and shows their deluded plans are already costing us vital investment and making the country poorer.”
Mr Musk wrote on Twitter that his new plant “will build batteries, powertrains & vehicles, starting with Model Y”.
As a major incentive, German officials and auto industry leaders have agreed to increase by half the existing government incentives for electric vehicles, worth €40,000 (£34,000).
The subsidy will be extended from the end of 2020 to the end of 2025, while the government and industry also agreed to aim for 50,000 publicly accessible charging stations nationwide by 2022.