Former prime ministers Tony Blair and Sir John Major have urged parliament to reject Boris Johnson’s “shameful” attempt to override parts of the Brexit Withdrawal Agreement.
The PM has said the European Union is threatening to impose a customs border in the Irish Sea, separating Northern Ireland from the rest of the UK.
Mr Blair and Sir John have accused the government of “embarrassing” the UK.
The Internal Market Bill will be debated in the Commons on Monday.
The bill would go against the Withdrawal Agreement signed by the UK and EU.
It addresses the Northern Ireland Protocol - the part of the Brexit Withdrawal Agreement 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 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 it 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 PM urged Conservative MPs on Friday to back the bill during a Zoom call, following concerns about his proposals.
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.
Ministers have sought to defend the government’s plans, with Cabinet Office minister Michael Gove saying the proposals were a means of protecting the “integrity” of the UK.
And Northern Ireland Secretary Brandon Lewis conceded the bill would break international law, but “in a very specific and limited way”.
Meanwhile, Sir Keir Starmer has accused the PM of “reigniting old rows” by working to override his own Withdrawal Agreement.
Writing in the Sunday Telegraph, the Labour leader said his party could back the Internal Market Bill if the government addressed “the substantial cross-party concerns that have been raised”.
But in order to win Labour’s support, the bill would need to no longer risk breaching international law and address devolved administrations’ concerns of a “power grab”.
“We should be getting on with defeating this virus, not banging on about Europe,” Sir Keir said. “Get on with Brexit and defeat the virus. That should be the government’s mantra.”