Boris Johnson has said the UK must reserve the right to override the Brexit deal to protect the country’s “economic and political integrity”.
The PM said legislation was needed to resolve “tensions” in the deal agreed with the EU and ensure the UK could not be “broken up” by a foreign power.
He suggested the EU was no longer negotiating in “good faith” by threatening to block food exports.
Critics of the Internal Markets Bill say it could flout international law.
The bill is expected to pass its first parliamentary test later when MPs vote on it at second reading at 22.00 BST.
However, a number Conservative MPs have said they will not support the bill as it stands and some could register their concerns by abstaining.
The UK left the EU on 31 January, having negotiated and signed the withdrawal agreement with the bloc.
A key part of the withdrawal agreement – which is now an international treaty – was the Northern Ireland Protocol, designed to prevent a hard border returning to the island of Ireland.
The Internal Market Bill proposed by the government would override that part of that agreement when it came to goods and would allow the UK to modify or re-interpret “state aid” rules on subsidies for firms in Northern Ireland, in the event of the two sides not agreeing a future trade deal.
Speaking at the start of the five-hour debate, the PM said the bill should be welcomed by everyone who cares about the “sovereignty and integrity of the UK”.
He said the UK had signed up to the withdrawal agreement, including the Northern Ireland Protocol, in “good faith” in the belief that it would result in “light touch” regulations on trade within the UK.
But he suggested the EU had acted in recent months in an “extreme and unreasonable”, claiming it had threatened not to allow the UK to export products of animal origin and “had not taken that revolver off the table”.
He said the bill gave the UK “protective powers” against the EU’s “proven willingness” to interpret aspects of the withdrawal agreement in “absurd” ways that were never intended.
“What we cannot tolerate now is a situation where our EU counterparts seriously believe they have the power to break up our country,” he told MPs.
“We cannot have a situation where the very boundaries of our country can be dictated to by a foreign power or international organisation.”
Mr Johnson said the UK would work with the EU to resolve differences as “quickly and amicably” as possible and conceded that Parliament would be given a vote before the reserve powers were ever invoked.
“I have absolutely no desire to use these powers. They are an insurance policy.”
But former attorney general Jeremy Wright said what the government was proposing risked breaking international law and questioned whether it left ministers at risk of breaching the ministerial code.
Ahead of the debate, Former Chancellor Sajid Javid said he could not see why it was necessary to “pre-emptively renege” on the Withdrawal Agreement signed with the EU earlier this year while talks on a trade deal continued.
“Breaking international law is never a step that should be taken lightly,” he tweeted.
The legislation, which sets out how trade between different nations of the UK will operate after the UK leaves the single market on 1 January – is likely to face more difficulties in its later stages, especially in the House of Lords.
A senior government source told the BBC “all options are on the table” in terms of possible action against Tory MPs who do not support the bill.
Five former prime ministers have raised concerns about the bill, including Boris Johnson’s predecessor Theresa May – who will be absent from Monday’s debate as she is on a visit to South Korea.
Speaking earlier on Monday, David Cameron said “passing an act of Parliament and then going on to break an international treaty obligation…should be the absolute final resort”.
Labour have said they will oppose the bill unless major changes are made.
Mr Miliband is standing in for Sir Keir Starmer later at the opposition dispatch box after the Labour leader was forced to self-isolate at home when a member of his household developed possible coronavirus symptoms.