Engineering Director Costa joined Mercedes in 2011, having previously enjoyed successful spells in Formula 1 at Minardi and Ferrari, and will step into a consultancy role from 2019 so he can spend more time with his family.
The Italian is regarded as a vital cog in the recent technical development of Mercedes, helping them achieve four successive double world championship triumphs in Formula 1’s turbo hybrid era, which began in 2014.
Leading the engineering group in place of Costa will be Chief Designer John Owen, who will report to Technical Director James Allison. Owen - whose CV includes Sauber, Honda and Brawn - has been with the team since 2007.
As part of the shake-up, another central figure, Ellis, has opted to retire from his role as Performance Director and will take a sabbatical from the middle of next season.
Ellis is another with vast experience in Formula 1, playing a key role in Red Bull’s championship-winning years from 2010-2013 before returning to Brackley in 2014, where he has been able to continue that success.
Loic Serra, the team's current Chief Vehicle Dynamicist, will pick up Performance Director duties from Ellis at the end of this year, with Mercedes revealing the engineering group has evolved in recent months ahead of this technical shake-up.
Mercedes Team Principal Toto Wolff said: "This is a significant moment for our team and a great opportunity. We have said many times that you cannot freeze a successful organisation.
"It is a dynamic structure and I am proud that we are able to hand the baton smoothly to the next generation of leaders inside the team. We have been in discussion for many months with both Mark and Aldo about how best to implement this transition and to empower their successors.
"They could not be more different personalities but they have both respected that difference and their legacy with Mercedes will stand test of time. Since the early days of 2013, Aldo and I have shared many dinners in Oxford as fellow European exiles, as well as some amazing days in the car at the Mille Miglia last year.
“I have got to know not just an outstanding individual but also somebody who has taught me so much about Formula One and the humility it takes in order to be successful. With Mark, when we first met we could never have imagined the success we would achieve together.
“He has been a sparring partner in the truest sense of the word - and I will miss our 'tough love' discussions with their shared passion for our Team and driven by the ultimate will to win."
He added: "Mark and Aldo have both helped to shape the timing and manner of these changes, and the Team's future is very bright with John, Loic and our entire technical leadership working under James' direction."