The US Justice Department has told North Carolina that its law limiting protections for LGBT people violates national civil rights laws and must not be implemented.
The law invalidated several local anti-discrimination measures that protected gay and transgender people.
It also requires people to use public toilets that correspond to the sex listed on their birth certificates.
The governor has responded by accusing the Justice Department of “overreach”.
His office must confirm by Monday that the law will not be implemented, the Justice Department said.
Governor Pat McCrory said the threat of legal action and the risk of losing federal funds represented new ground in the powers of the federal agency.
The state could lose millions in federal funding for education if it upholds the law.
“The right and expectation of privacy in one of the most private areas of our personal lives is now in jeopardy,” Mr McCrory said.
“We will be reviewing to determine the next steps.”
When he passed the controversial law, House Bill 2, last month it sparked a huge backlash.
Bruce Springsteen was among many musicians who cancelled concerts and major businesses pulled out of the state.
Companies like Bank of America and Apple have criticised the law.
A Justice Department letter states that the law violates part of the Civil Rights Act banning discrimination based on sex.
The letter is not legally binding but essentially warns the state it is at risk of being sued.
Supporters of the law said allowing transgender people to choose their restroom could lead to women and children being attacked.
They said they feared that men could pose as transgender people and use legal protections as a cover.
Mr McCrory has made some small adjustments to the law but kept firm on the restrictions on public toilets.