This article is more than
7 year oldA key element banned transgender people from using toilets in accordance with their chosen gender, earning the measure the "bathroom law" tag.
The House of Representatives and the Senate cleared the repeal bill after legislators reached a late-night deal.
The deal came hours before the state was to lose key basketball fixtures.
The measure now heads to Democratic Governor Roy Cooper desk. He is expected to sign it into law.
The deal was announced late on Wednesday by Mr Cooper and Republican state lawmakers.
Mr Cooper, who ran for office on a platform of repealing the measure, known as House Bill 2, said: "It's not a perfect deal, but it repeals HB2 and begins to repair our reputation."
Majority Republican leaders Tim Moore and Phil Berger said in a joint statement: "Compromise requires give and take from all sides, and we are pleased this proposal fully protects bathroom safety and privacy."
But the terms of the deal have angered LGBT activists.
The law had required transgender people to use toilets in schools and government buildings that correspond to the sex listed on their birth certificates.
Although the deal repeals the law, state legislators will remain in charge of policy on multi-occupancy restrooms.
It creates a moratorium so that local government, state colleges and universities cannot pass measures extending non-discrimination on sexual orientation and gender identity until December 2020.
The compromise angered LGBT activists.
Equality NC executive director Chris Sgro said before the proposal was agreed that it was "a train wreck that would double down on anti-LGBTQ discrimination. North Carolinians want a clean repeal of HB2, and we urge our allies not to sell us out".
Mr Sgro added on Thursday that legal challenges could follow if lawmakers approved the measure.
Human Rights Campaign president Chad Griffin said: "At its core, it's a state-wide prohibition on equality."
Businesses, entertainers and sports teams had boycotted North Carolina in the wake of the law's passage last year.
Its largest city, Charlotte, lost the National Basketball Association (NBA) All-Star game, which was moved to another state.
North Carolina was on Thursday set to lose its ability to host any college (NCAA) basketball championships from 2018 to 2022 "absent any change" in the House Bill 2.
The controversial bill will cost the state more than $3.67bn in lost business over 12 years, according to a recent Associated Press analysis.
Mr Cooper beat Republican Pat McCrory, who had signed the law, in an election in December.
The then-governor-elect attempted to reach a compromise over the law during a special session in December, but failed.
Critics of the bill say it has encouraged lawmakers in other states to put forward their own version of House Bill 2.
As of March, 16 states were considering bathroom bills, according to the National Conference of State Legislatures.
Among those states are Texas, Tennessee, Arkansas, Illinois and Minnesota.
Newer articles