Ferrari have made a disappointing start to the 2014 season, with neither Fernando Alonso nor Kimi Raikkonen scoring a podium over the first three races. In a statement, Domenicali said he takes "responsibility, as I have always done, for our current situation".
The statement continued: "There are special moments that come along in everyone's professional life, when one needs courage to take difficult and very agonising decisions. It is time for a significant change.
"This decision has been taken with the aim of doing something to shake things up and for the good of this group of people that I feel very close to. With all my heart, I thank all the men and women in the team, the drivers and the partners for the wonderful relationship we have enjoyed over all these years.
"I hope that very soon, Ferrari will be back where it deserves to be.
"My final words of thanks go to our President, for having always supported me and to all our fans. I only regret that we have been unable to harvest what we worked so hard to sow in recent years."
Domenicali joined Ferrari in 1991 and after a series of promotions was appointed sporting director in 2003, when Michael Schumacher took the fourth of his five straight world championship crowns with the team. He then took over from Jean Todt as team principal ahead of the 2008 season.
The team secured the constructors’ championship in Domenicali’s first year in charge, but have since failed to clinch the drivers’ crown despite several near misses.
Felipe Massa famously lost the 2008 championship to Lewis Hamilton on the final corner of the final round, while Alonso was beaten by Sebastian Vettel in final-race title showdowns in both 2010 and 2012.
The advent of Formula One’s new 2014 rules had offered Ferrari a chance to return to the very top of the sport, but a lacklustre start to the season was compounded by Alonso and Raikkonen fighting at the lower fringes of the top ten in Bahrain, with Ferrari’s power unit struggling to match that of Mercedes.
Ferrari president Luca di Montezemolo paid tribute to Domenicali, saying: "I thank Stefano, not only for his constant dedication and effort, but also for the great sense of responsibility he has shown, even today, in always putting the interests of Ferrari above all else.
"I hold Domenicali in esteem and I have watched him grow professionally over the twenty three years we have worked together, I now wish him every success for the future."
Montezemolo also welcomed the appointment of Mattiacci, who joined Ferrari in 1999 and was president and CEO of Ferrari Asia Pacific for four years before his move to the corresponding position for the North American market.
"I also want to wish all the best to Marco Mattiacci, whom I know to be a highly regarded manager and who knows the company well," Montezemolo added. "He has accepted this challenge with enthusiasm."