Mercedes will leave DTM at the end of 2018 and enter Formula E from 2019/20.
The three-pointed star has participated in DTM since the category was re-launched in 2000, but now leaves just Audi and BMW as manufacturers.
The last time there were only two manufacturers in DTM was 2011, the year before BMW joined the championship.
“Our years in the DTM will always be held high as a major chapter in the motorsport history of Mercedes,” said Mercedes motorsport boss Toto Wolff.
“I want to thank every team member whose fantastic work has helped to make Mercedes-Benz the most successful DTM manufacturer during that time.
“Although leaving is tough for all of us, we will be doing everything during this season and next to make sure we win as many DTM titles as possible before we go. We owe that to our fans and to ourselves.”
Mercedes first joined the modern DTM’s predecessor, the Deutsche Tourenwagen Meisterschaft, in 1988, securing its first title with Klaus Ludwig in 1992.
Its works HWA operation currently runs all six of its 2017 entries, with Gary Paffett and Paul di Resta joined by Lucas Auer, Edoardo Mortara, Maro Engel and Robert Wickens.
The agreement signed by Mercedes and Formula E Holdings late last year was originally for a Season 5 (2018/19) entry, but instead the German auto giant will make its debut in Season 6.
Wolff explained this was to “give us time to properly understand” Formula E and “prepare for our entry in the right way.”
He also reiterated Mercedes’ commitment to Formula 1, which was bolstered by a recent extension to its long-standing title sponsorship agreement with Petronas.
“In motorsport like in every other area, we want to be the benchmark in the premium segment and to explore innovative new projects. The combination of Formula 1 and Formula E delivers that,” he said.
“Formula E is like an exciting start-up venture: it offers a brand new format, combining racing with a strong event character, in order to promote current and future technologies.
“Electrification is happening in the road car world and Formula E offers manufacturers an interesting platform to bring this technology to a new audience, and to do so with a completely new kind of racing, different to any other series.”
It’s understood that HWA will run the Mercedes Formula E outfit in Season 6, and could enter the championship in Season 5 as part of a tie-up with Venturi, which currently field Engel in Formula E.