DURHAM, N.C. — The onslaught of criticism, economic sanctions and a lawsuit being leveled at Gov. Pat McCrory of North Carolina grew on Tuesday, as the largest corporation in his state joined the fight against a new law that eliminated anti-discrimination protections for lesbian, gay, bisexual and transgender people.

Bank of America, which has its headquarters in Charlotte, N.C., announced late Tuesday on Twitter that its leadership was joining over 80 chief executives, including Timothy D. Cook of Apple and Mark Zuckerberg of Facebook, in objecting to the new law. Earlier in the day, the chief executives published a letter, addressed to Mr. McCrory, on the Human Rights Campaign website, saying, “Such laws are bad for our employees and bad for business.”

Mr. McCrory, a Republican, signed the law last Wednesday to create a mandatory statewide anti-discrimination policy that excludes protections based on sexual orientation and gender identity. The bill, created by Republican legislators in an emergency session that same day, was intended to overrule a new municipal ordinance in Charlotte, the state’s largest city, that provided such protections, including allowing transgender people to use bathrooms according to the gender they identify with. It was set to take effect Friday.

Condemnation rained down in response. The governors of New York, Washington and Vermont issued bans on most official state travel to North Carolina, as did the mayors of San Francisco, Seattle and New York. The National Basketball Association implied it might move the 2017 All-Star Game from Charlotte. The White House press secretary, Josh Earnest, called the law “meanspirited.”