Mercedes will quit the DTM at the end of next year, and has confirmed it will take up its option of a Formula E entry for the 2019/2020 season.
The Stuttgart brand has been a core part of DTM since the category was relaunched in 2000.
Its departure at the end of 2018 will leave the German tin-top series with only two manufacturers, BMW and Audi, for the first time since the 2011 season.
"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 Paffett and di Resta joined by Lucas Auer, Edoardo Mortara, Maro Engel and Robert Wickens.
FORMULA E ENTRY LATER THAN EXPECTED
The agreement signed by Mercedes and Formula E Holdings late last year was originally for a 2018/19 entry, but instead the German auto giant will make its debut the following season.
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 F1, 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 six, and could enter the championship in season five as part of a tie-up with Venturi, which currently runs factory driver Engel.