Ex-Prime Ministers Tony Blair and Sir John Major have urged MPs to reject the “shameful” attempt to override parts of the Brexit Withdrawal Agreement.
The two have accused the government of “embarrassing” the UK by seeking the power to change the details of a treaty agreed last year with the EU.
MPs will begin debating the contentious Internal Market Bill on Monday.
A senior minister said the ex-PMs weren’t “close” to the process and the UK was in a unprecedented situation.
Justice Secretary Robert Buckland said the powers being sought by ministers to amend aspects of the Northern Ireland Protocol were an “insurance policy” to be used only if attempts to settle differences in other ways failed.
The Protocol, a key part of the Withdrawal Agreement signed by both sides last year, is designed to prevent a hard border returning to the island of Ireland.
If the bill becomes law it would give UK ministers powers to modify or “disapply” rules relating to the movement of goods between Britain and Northern Ireland that will come into force from 1 January, if the UK and EU are unable to strike a trade deal.
Writing in the Sunday Times, Sir John and Mr Blair – former Conservative and Labour prime ministers respectively – said the government’s actions were “irresponsible, wrong in principle and dangerous in practice”.
“It raises questions that go far beyond the impact on Ireland, the peace process and negotiations for a trade deal – crucial though they are. It questions the very integrity of our nation,” they said.
The former leaders, both vehement opponents of Brexit, said that respecting treaty obligations was “just as important” as domestic law, and called for MPs to reject the legislation.
“As the world looks on aghast at the UK – the word of which was once accepted as inviolable – this government’s action is shaming itself and embarrassing our nation,” they added.
By Leila Nathoo, political correspondent
Tony Blair and Sir John Major say Boris Johnson knew the full consequences of the Brexit divorce deal he struck with Brussels last year – that new barriers to trade would arise between Northern Ireland and the rest of the UK.
They say the government’s plans to now override parts of the deal would imperil the Good Friday Agreement, undermine the UK’s credibility in future trade deals and could prompt a damaging retaliation from the EU.
They accuse ministers of embarrassing the UK, by negotiating with what they call “cavalier bombast posing as serious diplomacy” – an approach they say questions the very integrity of the nation.
Their intervention is, however, unlikely to sway Mr Johnson, who’s insisted the Internal Market Bill is a necessary safety net to protect the union and peace process – and has defied EU demands to withdraw the contentious clauses before the end of the month.
The prime minister’s appealed to MPs to back the legislation – his predecessors say it’s Parliament’s job to stop his plan going any further.
The two former leaders were in office during key periods of the Northern Ireland peace process.
In December 1993, Sir John helped negotiate the Downing Street Declaration in an attempt to secure paramilitary ceasefires in Northern Ireland. Less than a year later, the IRA called its first ceasefire.
It helped pave the way for all-party talks which culminated with the Good Friday Agreement in April 1998 when Tony Blair was in No 10 – a deal that is widely seen as marking the effective end of Northern Ireland’s “Troubles”.
The EU has warned the UK it could face legal action if it does not ditch controversial elements of the Internal Market Bill by the end of the month.
The Democratic Unionist MP Sammy Wilson, whose party opposed the Withdrawal Agreement, said Mr Blair and Sir John were talking “utter bunkum”.
He said the former leaders should be focusing on the risk of a “trade border” between Northern Ireland and the rest of the UK and the damage this would do to NI’s economy.
“The suggestion by the hero of the peace process brigade that the bill rips apart the Belfast Agreement is complete and utter bunkum without any factual basis,” he said.
“They need to explain how making it easier for Northern Ireland to do business with our biggest market undermines the Belfast Agreement.
“They need to explain how Northern Ireland companies having less paperwork undermines the Belfast Agreement.”