Robert Kubica will contest the 2020 DTM season in a customer BMW operated by single-seater squad ART Grand Prix.
Autosport first reported Kubica's potential move to the DTM in January, a month after he tested the BMW M4 at the post-season rookie test at Jerez.
The deal has now been confirmed, Kubica becoming the seventh BMW driver in the series alongside the Bavarian marque's six factory signings.
The Polish driver's entry will be run by ART, which returns to the DTM for the first time since 2016.
It operated two factory Mercedes cars between 2015-16, before a regulation change that limited the grid to six cars per manufacturer forced it to pull out of the category.
As expected, Kubica's deal has been bankrolled by his personal backer PKN Orlen and has received the blessing of the Alfa Romeo Formula 1 team, which signed him as its reserve driver last month.
"The DTM has appealed to me for a long time - and the test in December at Jerez de la Frontera really gave me a taste for more," said Kubica.
"I am really looking forward to starting this new chapter in my motorsport career.
"I believe the DTM is one of the strongest and best race series in the world.
"I immediately felt at home in the BMW M4 DTM at the test.
"ART Grand Prix has been a big name on the international motor racing scene for years.
"I am sure we can achieve a lot together in the DTM.
"We obviously still have to gain experience compared to the established DTM teams, but we will work hard to ensure that we improve all the time.
"I can hardly wait to race in the DTM."
With this announcement, ART becomes the second customer team to race in the Class One era of the DTM, joining Audi squad WRT.
Kubica's entry pushes the grid size up to 15 cars, still shy of last year's 18-car grid.
"This is really great news for the DTM," said BMW Group Motorsport Director Jens Marquardt.
"We are delighted to welcome ART Grand Prix to the DTM as a private customer team.
"It has always been our goal to make the DTM field even larger and more attractive with privately-run BMW M4 DTMs.
"There were several options and we have held many discussions with potential teams in recent months.
"Considering all the aspects, we opted for the package provided by ART Grand Prix.
"After the test in Spain last December, Robert Kubica made no secret of the fact that he could imagine a future in the DTM.
"It is great that ART Grand Prix is now allowing him the opportunity to contest the 2020 season in a BMW M4 DTM.
"Robert showed during the test that is very good in a DTM car. He is a real asset to the series.
"We have our fingers crossed for ART Grand Prix and Robert, and hope they have a successful DTM season."
Kubica will take the wheel of the BMW M4 at the pre-season test at Monza in March, before the season kick-off at Zolder on April 24-26.
Autosport has produced a standalone special magazine to celebrate our 70th birthday. All current print subscribers will receive a copy for free. To order your copy of the 196-page Autosport 70th Anniversary issue, please go to: autosport.com/autosport70th