The foreign secretary insisted the bill would be legal under international law.
Boris Johnson's government agreed the trade deal - which governs how goods enter Northern Ireland from the rest of the UK - with the European Union in 2019 after the Brexit vote.
But a row over its impact on trade has created a block on forming a devolved government in Northern Ireland.
The Democratic Unionist Party (DUP) has refused to join the power-sharing administration until reforms are made to the deal, which it says treats Northern Ireland differently to the rest of the UK.
In Parliament, Ms Truss said the proposed law would not scrap the deal but make limited changes, such as freeing the movement of UK-made goods from "unnecessary bureaucracy" and regulatory barriers.
But in response to Ms Truss's statement, the EU said it would "need to respond with all measures at its disposal" if the UK went ahead with the legislation.
Ireland's foreign affairs minister, Simon Coveney, said the unilateral action from the UK was "damaging to trust".
And Labour said the government should abide by the deal it signed, and work with the EU "to find practical solutions to these problems" rather than altering the deal unilaterally.
The deal - known as the protocol - is a special arrangement that keeps Northern Ireland aligned with the EU single market for goods, avoiding a hard border with the Republic of Ireland.
The arrangement ensured free trade could continue across the Irish land border, which is a sensitive issue because of the history of conflict in Northern Ireland.
But the protocol brought in some new checks on goods moving between Great Britain and Northern Ireland and has been criticised by unionist politicians since its introduction in 2021.
The DUP's leader, Sir Jeffrey Donaldson, welcomed the UK government's proposed legislation and said his party would take "cautious" steps to re-engage with power sharing in Northern Ireland as it progresses.
Ms Truss told MPs in response to "the grave situation in Northern Ireland", there was a "necessity to act to ensure institutions can be restored as soon as possible".
She said the UK's preference remained a negotiated solution with the EU in consultation with its negotiator Maros Sefcovic, who has been invited to London for more talks.
If a resolution cannot be reached, the UK would take steps to "cement provisions" that are working in the protocol, while "fixing those elements that aren't".
"The government is clear that proceeding with our legislation is consistent with our obligations under international law," she said.
She said the bill would:
* Propose "green" and "red" lanes for goods travelling between Great Britain and Northern Ireland
* Ensure goods moving and staying in the UK are "freed of unnecessary bureaucracy" if they are not destined for the EU
* Remove regulatory barriers to goods made to UK standards being sold in Northern Ireland
* Allow businesses to choose between meeting UK or EU standards in a new dual regulatory regime
* Give the UK government power to decide on tax and spend policies across the whole of the UK
* Address issues related to governance, "bringing the protocol in line with international norms"
Elections to Northern Ireland's Assembly on 5 May resulted in a majority for politicians who accept the protocol, including the new largest party, Sinn Féin.
The party said the UK government was letting the DUP "hold society to ransom" after Mr Johnson met all political parties in Northern Ireland on Monday.
In a statement on Tuesday, Mr Sefcovic said the European Commission "stands ready to continue discussions with the UK government to identify joint solutions within the framework of the protocol".
"Should the UK decide to move ahead with a bill disapplying constitutive elements of the Protocol as announced today by the UK government, the EU will need to respond with all measures at its disposal," Mr Sefcovic added.
"Our overarching objective is to find joint solutions within the framework of the Protocol."
* The Northern Ireland Protocol is part of the Brexit deal: it means lorries don't face checkpoints when they go from Northern Ireland (in the UK) to the Republic of Ireland (in the EU)
* Instead, when goods arrive in Northern Ireland from the rest of the UK (England, Scotland and Wales), they are checked against EU rules
* The UK and the EU chose this arrangement because the Irish border is a sensitive issue due to Northern Ireland's troubled political history
What the foreign secretary is proposing would be a big change.
It would mean Northern Ireland operating under a dual system for trade in goods rather than following EU rules.
That's certainly more than a few tweaks.
The government argues that an "ambitious" plan is now needed to safeguard peace and democracy.
But it's not as if it inherited this problem; it negotiated the deal.
It's pretty clear that many MPs are deeply unhappy with the idea of the UK now making one-sided changes and going back on an international agreement.
The government insists it's acting within the law; it has promised to set out its legal position, although it's very unlikely we'll ever see the detailed legal advice behind it.
Despite all of this, nothing will actually change immediately.
Legislation would take time to pass through Parliament and hasn't even been published yet.
Significantly, neither the EU nor the UK has walked away from negotiations and both say that's really how they want to settle this.
Following Ms Truss's statement, some MPs - including Conservative Simon Hoare, who is chair of the Northern Ireland select committee - suggested the legislation would violate the protocol and breach international law.
But Ms Truss assured MPs the legislation would not and said "we will set out the legal position in due course".
Meanwhile, the prime minister defended the government's plans to change the protocol if they can not reach an agreement with the EU.
He said changes were a "necessity" to "fix the problems with the Northern Ireland political situation" but insisted they amounted to "getting rid of some relatively minor barriers to trade".
Asked if the UK could afford a trade war with the EU, he said: "I don't think that is likely."
Earlier, Marks and Spencer chairman and former Tory MP Archie Norman said the protocol is "very, very onerous" and costs the business about £30m.
"At the moment, wagons arriving in the Republic of Ireland have to carry 700 pages of documentation," he told the BBC. "It takes about eight hours to prepare the documentation. Some of the descriptors, particularly of animal products, have to be in Latin."
Any legislation to alter the protocol would have to be approved by Parliament in a process that could take months.
There are fears that, if the UK did use such legislation, the move would trigger a trade war with the EU. A trade war, which involves putting up barriers to the exchange of goods, could increase costs for consumers at a time of pressure on household budgets.
The EU has acknowledged the protocol has caused difficulties for Northern Ireland businesses. In October, it put forward proposals which, it said, would cut paperwork and checks on goods entering Northern Ireland from Great Britain.
However, the UK rejected these plans last week saying they would make things worse.