After three seasons and 33 races for Mercedes, Coulthard will take part in his final DTM race in the season finale at Hockenheim.
Coulthard, who won 13 of 246 grands prix in F1 over a 15-season career prior to switching to DTM in 2010, said: "I am looking forward to the final race of what has been an exciting season in the DTM.
"The weekend will be my final opportunity to compete at this level as I will stop racing in the DTM to concentrate on my developing off-track businesses, and of course my family."
Although only scoring 16 points during his three seasons, with his best finish a fifth earlier this year, Coulthard has been a popular character on the DTM scene.
Norbert Haug, Mercedes-Benz Motorsport vice-president, said: "David's involvement in the DTM has been good for him and the championship.
"He is skilled on the race track, and eloquent and analytical in his TV work and as an AMG brand ambassador.
"He has been a successful member of the Mercedes family for over a decade and a half, and will remain so after his retirement from active racing."