Kingspan's logo appeared on the helmet of Lewis Hamilton at the Saudi Arabian Grand Prix on Sunday, sparking protests after it emerged Kingspan products were used in Grenfell Tower, where 72 people were killed in a fire four years ago.
Mercedes said in a statement: "The Mercedes-AMG Petronas F1 team and Kingspan have announced they have mutually agreed to end their partnership.
"Announced last week, the new partnership included Kingspan chairing a new Sustainability Working Group for the team, and aimed to deliver carbon reductions through their leading-edge environmentally sustainable solutions for the team's future campus.
"However, both parties have subsequently concluded that it is not appropriate for the partnership to move forward at the current point in time, notwithstanding its intended positive impact, and we have therefore agreed that it will be discontinued with immediate effect."
Last week Lewis Hamilton insisted he had "nothing" to do with the deal, adding that he understood team principal Toto Wolff was "sorting" it.
"I had nothing to do with the team signing any of the sponsors," said Hamilton. "Tommy (Hilfiger) was the only one I probably brought to the team.
"It was news to me when I heard the things that have happened this week and I was very aware and watching closely all the families affected by what happened there."
The news was welcomed by Michael Gove, the Secretary of State for Levelling Up, who tweeted: "I am glad Mercedes listened to @GrenfellUnited's dignified representations and ended their sponsorship deal with Kingspan".
Grenfell United, a group comprising survivors and bereaved families, said it welcomed the development, which followed a meeting with Wolff last week.
"We're pleased to hear this morning's news that Mercedes have decided to terminate their sponsorship deal with Kingspan with immediate effect," a statement read.
"We met with Toto Wolff and shared the facts from the Grenfell Inquiry and Mercedes came to their own conclusion.
"Mercedes have taken a stance in their decision to disassociate themselves with Kingspan. They have shown that people can be put before profit."
In a statement of their own, Kingspan stressed the reciprocal nature of the decision to end the partnership.
“We are deeply aware of the sensitivities raised in recent days, and so we have jointly agreed that it’s not appropriate to move forward at the current point in time.”
“We had no role in the Grenfell Tower refurbishment. However, our Kingspan Insulation UK business is a core participant in the Grenfell Tower Inquiry and fully supports the Inquiry’s important work,” Kingspan said.
“We condemn in the strongest possible terms the wholly unacceptable historical conduct and emails which emerged throughout the course of the Inquiry discovery process. We have sincerely apologised for these actions by a small group of employees at our Kingspan Insulation UK business. This in no way reflects Kingspan’s culture or values.”